Char Set

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

Char Set

Post by Juraj »

I have a DBF file created in VO 2.6. When opening with OleDB connection in X# app, some characters will not be displayed correctly. In VO application, characters are displayed correctly on the same PC
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Char Set

Post by robert »

Jura,

Which OLEDB provider are you using ?
Can you mail me an example file ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

Char Set

Post by Juraj »

I using this connection string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+DBFDIR+";Extended Properties=dBASE IV;User ID=;Password=;"
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Char Set

Post by robert »

Juraj,

Mosty likely the Jet Dbase IV driver is not properly recognizing the Ansi/OEM bit in the DBF file or not recognizing the codepage.
I need to see your file to give an answer to that and to help you to make this work.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

Char Set

Post by Juraj »

I sent a DBF file on the mail robert@xsharp.eu
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Char Set

Post by robert »

Juarj,

Your database is created on a Central/Eastern European windows computer. This is visible when you look at byte 29 in the file. It has the value 0xC8.
That corresponds to the Codepage 1250.

https://msdn.microsoft.com/en-us/library/aa975345(v=vs.71).aspx

You need to tell the Jet driver to use a locale that matches that codepage too by adding the string "Locale Identifier=nnnn;" to your connection string.

You need to select a locale that has codepage 1250.

See http://www.science.co.il/language/Locale-codes.php

For example 1045 (Polish), 1029 (Czech) or 1051 (Slovak).

That should fix the problem.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Juraj
Posts: 161
Joined: Mon Jan 09, 2017 7:00 am

Char Set

Post by Juraj »

Rober,

I used more versions connstring:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+DBFFullNaz+";Extended Properties=dBASE IV;User ID=;Password=;Locale Identifier=1250"
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+DBFFullNaz+";Extended Properties=dBASE IV;User ID=;Password=;Locale Identifier=1252"
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+DBFFullNaz+";Extended Properties=dBASE IV;User ID=;Password=;Locale Identifier=1051"
But the problem has not fixed.

Juraj
Attachments
Example1.png
Example1.png (281.34 KiB) Viewed 783 times
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Char Set

Post by robert »

Juraj,

You need to give me more information.
Do you see any difference when you set the locale ?
And as far as I know you do not give the locale the codepage but the country id. So not 1250 or 1252 but 1051.

How are you checking the text? With the console window or on a UI window. Is that a VO GUI window (Ansi) or a Winforms window (Unicode).

And what is the active Ansi codepage on your computer ?

Can you create a small example of what you are doing.


Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply