Changing the code page of a text file

by Michael S. Kaplan, published on 2005/08/14 20:31 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/08/14/451626.aspx


Ken Skingle asked:

Is ther an easy way to change the default code page from OEM United States to say Western European (ISO) on the import/export wizard?

Ver being used is Access 2002 SP3

Thanks in advance

Well, if you are using Access 2002 then I have to correct you on one point -- OEM United States (a.k.a. code page 437) is not the default....

Starting in Access 2000 and Jet 4.0, the import/link text wizard uses MLang's functionality to try to detect the code page1.  So if the wizard is guessing 437 when it is not, then perhaps the size of the file is not big enough to help make the guesses accurate?

To have real influence on what the setting is, you have three choices:

  1. Load a template that has a previously saved code page setting, or
  2. Change the setting yourself to some other code page, or
  3. Have a bigger sample so that MLang can guess correctly.

The first two options are both off of the advanced dialog of the wizard, and the third is obviously just getting a better/bigger sample....

1 - See the April 2000 VBPJ and the article I wrote entitled Name That Language (registration required, but its free) for sample code that uses the functionality.

 

This post brought to you by "ஊ" (U+0b8a, a.k.a. TAMIL LETTER UU)


# Michael S. Kaplan on 14 Aug 2005 10:01 PM:

Sample code for this is also in my book....

# 余啊雷 on 11 Sep 2005 4:19 AM:

Yesterday, Buck Hodges was talking about how TFS Version Control determines a file's encoding: ...

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.

referenced by

2005/09/15 I might have stuttered

2005/09/11 Working hard to detect code pages

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