
What you ran into is not uncommon, especially if the data file gets pushed through one or more Microsoft applications at *any* point of the process. Said applications almost inevitably put all sorts of invisible bits that help the applications, but wreak havoc once you star assuming the file is straight ASCII, or nearly so.