Alex & Access

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
My Photo
Name:Alex Dybenko

Location:Moscow, Russia
Google
 
Web AccessBlog.net

Wednesday, August 20, 2008

Codepage to import dbf files

English/Dutch speaking people should be happy that they do not need to know about codepage. But we, Russian programmers, very good know what it means. The problem that there is one kind of codepage in MS-DOS, and different - in Windows. You can write text file in notepad, and then your can’t read it in MS-DOS – Russian characters have different ascii codes.

DBF files were originally encoded in OEM (MS-DOS), but now can be also encoded in ANSI (Windows), so when you read dbf file from Access (import or link) you have to use proper code page. The only way (as I know) to change it - is to set registry key DataCodePage:

Access 2000-2003 (Jet 4):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase]

Access 2007:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Access Connectivity
Engine\Engines\Xbase]

Possible values can be ANSI or OEM.

Of course, you need to have enough permissions to do so, plus keep in mind that you also change it for other users logged to this PC. And you have to restart Access in order new option take place. VB 6 help states that there is an option to set code page to local user, but I have not succeeded with it...

Labels: , ,

3 Comments:

Anonymous Anonymous said...

This works also for german language.

thank you very much!!!

3:07 PM  
Anonymous Stéphane said...

Alex you saved my life !
It works in French too :-)

6:31 PM  
Blogger hai nam said...

thank u very much, I'm have met the same problem with Vietnamese. thanks to your post, i have just recovered it.

6:34 AM  

Post a Comment

Links to this post:

Create a Link

<< Home