Re: FreeTDS and UTF-8 support - What is UNICODE?

Igor Korot <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <19459118.1216919302098.JavaMail.root@mswamui-chipeau.atl.sa.earthlink.net>
Sebastien,

-----Original Message-----
>From: Sebastien FLAESCH <[email protected]>
>Sent: Jul 24, 2008 9:11 AM
>To: Igor Korot <[email protected]>, FreeTDS Development Group <[email protected]>
>Subject: Re: [freetds] FreeTDS and UTF-8 support - What is UNICODE?
>
>Igor Korot wrote:
>> Sebastien,
>> 
>>> SQLWCHAR is #define UNICODE dependent, and I think it can be wchar_t,
>>> while SQLCHAR can only be char.
>> 
>> SQLWCHAR _is_ #define UNICODE dependent (that's why it has W in it's name),
>> however it is resolving itself to be unsigned short. When I was looking at
>> the unixODBC headers, I was also confused and had to ask the maintainer.
>> 
>> The reason being (according to him) is that 'unsigned short' is 2 bytes
>> everywhere, and also because SQLWCHAR is defined as UTF-16 on Windows.
>> I don't know about SQLCHAR though. My program is UNICODE only.
>
>Thanks Igor ... interesting.
>
>If you let me make a comment about your last sentence:
>
>"My program is UNICODE only."

OK, let me rephrase it then:

"My program is "UNICODE" only." ;-)

>
>I think we should not use "UNICODE" when we talk about a character set
>(must be "UCS-2" in your case).
>
>UNICODE can be implemented by different character encodings, it can be
>UTF-7, UTF-8, UTF-16, UCS-2, UCS-4 ...

I totally agree with you. However, it looks like *nix is using UTF8 by default
as a "wide character" encoding. And it becoming a standard "de ure".
>
>I known the Windows people think UNICODE = UCS-2 / UTF-16 but that's
>a shortcut that confuses people that are new to I18N ;-)

Yes, see above.

>
>http://en.wikipedia.org/wiki/UNICODE

Also, keep in mind that my comment refers to the unixODBC. I didn't check what is
going on in the iODBC package. That will be my next step, unless you want to do it/
beat me to it.

>
>Cheers,
>Seb

Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.