Regional settings and charaters

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Goran
Posts: 16
Joined: Tue 03 May 2005 15:38
Location: Ljubljana, Slovenija

Regional settings and charaters

Post by Goran » Tue 03 May 2005 15:39

Hi!

I have a strange problem where I don't know how to overcome it.
I have a MS SQL database witch collation Slovenian_CI_AS and with string fields of type nvarchar. I have installed MS SQL servers and MSDE's on different machines, always properly configured for our (Slovenia) region. They were Windows 2000, XP and 98, all set by default on regional settings Slovenian etc. and there the database is working perfectly.
Today I have installed MSDE + Client tools on a machine with Windows 98 PanEuro which was originally installed without support for Eastern Europe and with regional settings set to English (United States). I have changed this to Slovenian and I already knew that there will be problems with system font.
But this is an easy part, more problematic is the data transfer from/to database. Except character ch everything is okay, only this character is shown as letter C without the circumflex above. Everything that has been previously and correctly stored into the database is seen in the application as letter C. If I correct it with the correct letter in my application, then it is stored in database as letter E but then correctly displayed back in the application.
Can somebody explain me in some detail, for what shall I look in MSDE, MDAC or somewhere else? Where the problem lies?

With best regards,
Goran

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 04 May 2005 10:57

The problem you met is quite difficult and has several parts:

- Using N(var)char fields in this case doesn't have many advantages in comparison with ordinary non-Unicode fields, as dbExpress doesn't support Unicode. So data from the server is requested as char-fields.
- For correct passing char-fields server needs a coincidence of Default Codepage at the server and client side.

Try to set Default Codepage to Slovenian on client.

Guest

Post by Guest » Wed 04 May 2005 11:24

Hi Ikar!
Thank You for Your reply. The problematic computer has MSDE installed and regional settings, which were changed before the installation, are set to Slovenian. On the same computer is also the application. Can You please tell me a little bit more, where should I set Slovenian codepage?

Best regards,

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 05 May 2005 13:02

> Can You please tell me a little bit more, where should I set Slovenian
> codepage?

Unfortunately, I couldn't tell you more exactly.

Try to change Nvarchar to varchar, remember to set Collate on it.
Do you have any changes in behaviour?

Goran
Posts: 16
Joined: Tue 03 May 2005 15:38
Location: Ljubljana, Slovenija

Post by Goran » Mon 13 Jun 2005 08:08

Hi Ikar!
It's been while since my last post :wink: No it doesn't change anything.
Meanwhile I have set up "corrupted" Windows 98 installation under VMWare and more or less ADO works okay on nvarchar fields (not 100% though!), while on varchar fields it has similar problems. With dbxpress it doesn't matter, there are problems with both type of fields...

Best regards,
Goran

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 13 Jun 2005 13:11

ADO correctly processes Unicode data in difference on dbExpress.

> more or less ADO works okay on nvarchar fields (not 100% though!), while
> on varchar fields it has similar problems.

I can suggest that the problem is in transferring varchar fields between client and server.
As this problem concerns ADO also the cause is not in the settings of ADO or DbxSda but at the common settings of the client or server.

Post Reply