[unixODBC-dev] Unicode support

SHANKAR Uma Uma.SHANKAR at 3ds.com
Mon Aug 17 20:22:59 BST 2009


Thanks Nick for the quick response. I did not realize that about
wchar_t's. Since I am not a regular unix developer, I have a couple of
further questions.
 Are there other constructs that I could use for wide-chars conversions
that would be more portable between both windows and unix? I will try
out iconv like you suggest as well.



-----Original Message-----
From: unixodbc-dev-bounces at mailman.unixodbc.org
[mailto:unixodbc-dev-bounces at mailman.unixodbc.org] On Behalf Of Nick
Gorham
Sent: Monday, August 17, 2009 2:54 PM
To: Development issues and topics for unixODBC
Subject: Re: [unixODBC-dev] Unicode support

SHANKAR Uma wrote:
>
> Hi,
>
> We are using MySql/unixODBC on linux. I am converting UTF8 strings to 
> Unicode using unixODBC on linux. The same seems to work fine on 
> Windows. The UTF8 strings are converted to Unicode using the 
> "mbstowcs" function using wchar_t's. There does not seem to be problem

> in the conversion . Once the wide-char string is fed to the driver, 
> all I see is the first char of the wide-char being written to the db.
>
> As an example , I have:
>
> Insert into <table> (a) value "WideStr";
>
wchat_t are 4 bit on unix, unixODBC uses the same 16 bit unicode as on 
windows. Try using iconv to convert to UCS-2

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev


More information about the unixODBC-dev mailing list