Re: FreeTDS and UTF-8 support - What is UNICODE?
Igor Korot <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <11624294.1217436577051.JavaMail.root@elwamui-norfolk.atl.sa.earthlink.net> |
Hi, Sebastien, This is a responce from the iODBC group: -----Original Message----- >From: iODBC Maintainer <[email protected]> >Sent: Jul 30, 2008 3:39 AM >To: Igor Korot <[email protected]> >Subject: Re: [Iodbc-list] SQLWCHAR: what it resolves to? > >Hi Igor, > >> In Windows SQLWCHAR resolves itself to be a UTF16. >> In *nix on unixODBC SQLWCHAR resolves itself to be unsigned short, i.e. UTF16. >> >> What is SQLWCHAR in iODBC? Does it follow unixODBC implementation? >> Does it depend on the "#define UNICODE" statement? >> > >At this time iODBC uses wchar_t on Unix, but this is scheduled to change >for the next release of iODBC. > > >Patrick So, iODBC didn't follow MS standard, but hopefully will do that starting from the next release. I asked to confirm that and when the next release is antisipated. I will post the result here. Thank you. -----Original Message----- >From: Igor Korot <[email protected]> >Sent: Jul 24, 2008 10:08 AM >To: Sebastien FLAESCH <[email protected]>, FreeTDS Development Group <[email protected]> >Subject: Re: [freetds] FreeTDS and UTF-8 support - What is UNICODE? > >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.