Txt Files specifications Office 2010 v 2019 (1 Viewer)

mowatt55

New member
Local time
Today, 02:06
Joined
Aug 27, 2020
Messages
4
I upgraded a user to office 2019 from 2010 and that seems to have broke the txt file export from Access. Everything looks the same, the only thing I can see is the 2010 txt file is encoded as ANSI and the 2019 is UTF-8. The txt file that downloads looks like the columns are not coming through with the correct specifications.
orderspec.png


this is what the txt file spec is set up like.
 

mowatt55

New member
Local time
Today, 02:06
Joined
Aug 27, 2020
Messages
4
Hi. What exactly does "broken" mean?
the txt file isn't pulling through with the correct fixed width columns, seems to look more like a delimited file.
psderror.png
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:06
Joined
Feb 19, 2002
Messages
42,981
Looks like PO# has some junk in it but the other columns seem to align correctly. Can you tell where the spurious data is coming from?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:06
Joined
Feb 28, 2001
Messages
27,001
I ran into that problem when dealing with UTF-encoded text files for my Ancestry.COM project. Their GEDCOM output files are UGLY in more ways than one, but if you convert them, they are usable. I don't know that Access will handle UTF-8 correctly without a little help. I know I never managed to fix that problem.

The EFFECT of UTF encoding is that if you have a certain extended character (of which there can be hundreds depending on the UTF "flavor" in question), some characters that WOULD be single-character in UTF-8 format will be multi-character in a byte-by-byte character dump. UTF has one or more "escape" codes (NOT talking about the ESC character) that, if found, indicate that the actual character is actually chosen by the next character, which is not from the ASCII character set but is from an extension of the character set. Common cases are letters with diacritical marks above them. In extreme cases for some of the higher UTF formats, you can have three more bytes (total 4 bytes) to represent one character. BUT literal-minded parsers (Access import tools for example) see that as four characters and thus can lead to alignment problems.

There are several variants of UTF, with UTF-8 being a popular one. When dealing with this using NOTEPAD, you can save the file in another format such as ANSI text. That changes any UTF "special character" into some unprintable character that only takes up 1 space. I checked but did not see any libraries that Access could reference to create app objects for NOTEPAD or WORDPAD, though either one has the "Save As" ability and can manually be forced to ANSI output. Therefore, whenever I deal with a new copy of my Ancestry file, I must manually reformat it before actually trying to analyze it.

I suppose it is POSSIBLE that you COULD activate WORD to open the file and then save it as ANSI TEXT under another name. That would involve opening Word as an App Object. If you have a way to control the source of that file to make it save in some other format like ANSI, that might be better.
 

Users who are viewing this thread

Top Bottom