Gopi Krishna Komanduri wrote: > Hi, > I am new to unix c++ programming environment. I have experience in vc++ > programming. For unicode support , we used to change the setting of visual > studio . > In unix environment , will there be any option to set for unicode > environment. Actually , I am using SQL ODBC apis. I ported this code from > windows environment. I used SQLWCHAR datatypes . I hve used UNICODE support > in visual studio. after porting the code into UNIX , I have used gcc > compiler. It is treating all SQL ODBC apis in multibyte format , and giving > error saying as cannot convert datatype from SQLWCHAR to SQLCHAR. > > Could you please clarify how to get UNICODE support. > > Thx, > --Gopi
SQLWCHAR on Windows uses UTF-16 and stores data in 2-byte chunks (with the exception of surrogate pairs, which uses 4-byte chunks - ugh, I hate Unicode). SQLWCHAR on Linux, if it were defined, would be 4-byte chunks (Unicode is natively stored as UTF-32 on Linux): http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.apdv.cli.doc/doc/r0000584.html http://mailman.unixodbc.org/pipermail/unixodbc-support/2007-January/001157.html This only goes to show that UTF-8 (Unicode Transformation Format, 8-bit chunks) is better supported than any other UTF by databases and is the the ONLY UTF that works natively across all platforms. It is also the ubiquitous UTF used in Internet browsers. I know WAAAAY too much about Unicode (possibly more than probably anyone else on this list). UTF-8 is the cleanest way to go for cross-platform compatibility as you are now discovering. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
