Topic
1 reply Latest Post - ‏2011-06-23T10:26:28Z by hgnat
hgnat
hgnat
2 Posts
ACCEPTED ANSWER

Pinned topic Multibyte character data with Informix and VB.NET

‏2011-06-22T14:00:00Z |
Hi,

I have a problem using Unicode data with Informix and VB.NET.
I want store in my database, character data from two or more languages that require different character sets (English, Russian, Chinese, ...).
I created the database with the environment variable DB_LOCALE equal to “en_US.utf8” and specified DB_LOCALE=en_US.utf8 in the connection string, but it didn't work.
When you read back the data, it's different from the original.

I tried this:
- insert into t1( f1 ) values ( '先秦兩漢' )
- select f1 from t1
This give me the value ‘????’
  • set explain on
  • select count(*) from t1 where f1 = '先秦兩漢'
In the explain output file I found: select count(*) from t1 where f1 = '';

The column f1 is declared NVARCHAR(20)
For CLIENT_LOCALE I tried both en_US.utf8 and en_US.1252.

Using:
Informix IDS 11.50.FC5WE
Informix SDK 3.50.TC2DE
VB.NET (Ifxoledbc.2)

Thanks in advance.
Updated on 2011-06-23T10:26:28Z at 2011-06-23T10:26:28Z by hgnat
  • hgnat
    hgnat
    2 Posts
    ACCEPTED ANSWER

    Re: Multibyte character data with Informix and VB.NET

    ‏2011-06-23T10:26:28Z  in response to hgnat
    Found the solution by myself. Add "client_locale=en_us.1252;db_locale=en_us.utf8;UNICODE=True;" to the connection string