1

I'm trying to read .DB (Paradox 5) file within my Visual Basic 6. Everything's OK except encoding/charset. It shows as Iieiei 75a instead of cyrillic string.

This is my ODBC Connection string:

Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 4.X;DataCodePage=ANSI;BDE=2;CollatingSequence=ASCII;AutoTranslate=No;DBQ=C:\Database;DefaultDir=C:\Database

Please note that software like Borland Database Desktop shows this strings without any problems. Also everything is fine in another PC.

I set following settings via regedit, by it doesn't help:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase] 
"DataCodePage"="ANSI" 
"BDE"=dword:00000002 

I also tried to use CharToOem/Oem2Char Win API functions, it doesn't help.

Any ideas?

Ken White
  • 123,280
  • 14
  • 225
  • 444
Serhii Matrunchyk
  • 9,083
  • 6
  • 34
  • 47
  • When you tell it to use `ANSI` perhaps it uses the current session's codepage? Maybe plug in the exact codepage your data was encoded with to make it work universally? – Bob77 Feb 13 '16 at 18:02

1 Answers1

0

Okay I have solved this by changing following registry values:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase] 
"DataCodePage"="ANSI" 
"BDE"=dword:00000002 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage]
"1252"="1251.nls"

Last setting has solved the issue.

Serhii Matrunchyk
  • 9,083
  • 6
  • 34
  • 47