I might have stuttered

by Michael S. Kaplan, published on 2005/09/15 03:16 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/09/15/467051.aspx

About a month ago, Ken Skingle asked me about Changing the code page of a text file. I thought I gave a pretty clear answer to the topic. However, the reply I got was the following:

Thanks for reply - do not know what is different as my Access is 2002 and on the advanced tab (import) it comes up as OEM United States automatically.

My problem with wanting to change this to Western Eurpean is that we deal with a lot of mailing data where the characters of names and places have the original country accents, e.g.Lpez, La Corua, Geral De Depsitos Sa, Av Joo Xxi 63, Mller-Rusch, Ra Nueva ,Hnggi, Schifflnde 5, Zrich, lvaro, Jos If this small batch of names is imported as is it does offer Western European(Windows) as the Page Code and they import correctly.

However if these names are contained within a much larger file of various types it offers OEM United States as the code page and on importing it corrupts the unique characters.

eg L≤pez, La Corua, Geral De Dep╙sitos Sa, Av Joπo Xxi 63 Mⁿller-Rusch, Ra Nueva 30, HΣnggi SchifflΣnde 5 Zⁿrich └lvaro

Initially we may not be aware of the different chrs in the data until print time!

So having Western European offered as default would be good. (have screen shots of code page and version if required)



The code page of a text file being imported is selected by an MLang code page detection guessing. I even wrote an article on how to use the same functionality yourself in the April 2000 Visual Basic Programmer's Journal entitled 'Name That Language.' (fee required to see the article, sorry! I do not get any of the money, FWIW).

So there is no way to change the 'default' as that is the encoding being detected, Ken.

There is no default to change. Period.

You have four choices, and ONLY four choices -- take your pick of which one you like:

  1. Hit the Advanced button and change the code page prior to import.
  2. Use an import specification by creating one from that same Advanced dialog with the changes code page value. Save the specification and use it for future imports.
  3. Change the format of the text file -- there is something in there that is causing it to incorrectly judge the wrong code page. So experiment with changing the file until that does not happen.
  4. Don't use the Microsoft Access text import wizard; find some other means of getting it done.

Hopefully the above is entirely clear at this point. Of the above four options, #2 is the most automatable....

no comments

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day