Informix .NET and Polish locale (required help)
Posted in 2007
Topics: Stored Procedures & SPL, Internationalization & Character Sets
Hello , we have an Informix Database that has Polish laguage data. The database locale is CP1252. The problem is that when we use the Informix .NET Client SDK Version 2.90.4.0 to retrieve this data we get an Unspecified Error -21000 exception. Moreover the characters of the polish language are not displayed correctly. I try to set db_locale=en_US.1252 and client_locale=en_US.8859-2 or client_locale=en_US.1250 but i get unable to load locale categories or database locale information mismatch exceptions Please help because i have tried nearly everything with no result ! Thanks
alexandrostrf@gmail.com wrote:
> Hello ,
> we have an Informix Database that has Polish laguage data.
> The database locale is CP1252.
> The problem is that when we use the Informix .NET Client SDK Version
> 2.90.4.0 to retrieve this data
> we get an Unspecified Error -21000 exception.
> Moreover the characters of the polish language are not displayed
> correctly.
>
> I try to set db_locale=en_US.1252 and client_locale=en_US.8859-2 or
> client_locale=en_US.1250
> but i get
> unable to load locale categories
> or
> database locale information mismatch
> exceptions
>
> Please help because i have tried nearly everything with no result !
>
> Thanks
>
Very "interestingt" subject... I'd say this is one of the hottest topic in tech
support.
I imagine you've been using the defaults (DB_LOCALE = CLIENT_LOCALE =
en_US.CP1252) with previous CSDK versions.
If it's so, you've been inserting Windows characters withou translation into
the database.
Starting with recent versions (2.90.TC4?), CSDK don't use CP1252 for DB Locale.
It uses the DB effective locale. This can cause the following problems:
- There are characters in CP1252 which don't have representation in other locales
- Some customers may have inserted CP1252 characters in databases with codesets
that don't have representation for them (because no conversion was being done)
As a workaround you should use the settings you were using before, but you have
to clean up your data by identifying which characters are invalid.
The important issue is the fact that CP1252 contains characters not supported
in other codesets. Examples are (you'll need MS Word for example to see them):
- Opening and closing double quotes
- A wider minus sign (Ifen sign?)
Please check your db locale with:
database sysmaster;
select * from sysdbslocale
If it's really CP1252 then you probably changed the CLIENT_LOCALE in your
client environment. If it isn't CP1252 and you need to force it the engine will
complain (if you're using a recent 10.00 version and possible latest 9.40). In
this later case you can set an environment variable before starting the engine
to allow connections with wrong DB_LOCALE. Guy Bowerman has a blog article on
this subject... A quick Google lookup should point to it.
Regards.
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...