Unicode String literals on various platforms

From: Jones, Bob (Bob_Jones@jdedwards.com)
Date: Thu Aug 03 2000 - 11:45:21 EDT


In a C program, how do you code Unicode string literals on the following
platforms:
NT
Unix (Sun, AIX, HP-UX)
AS/400

Everything I have read says not to use wchar_t for cross platform apps
because the size is not uniform, i.e. NT it is an unsigned short (2 bytes)
while on Unix it is an unsigned int (4 bytes). If you create your own TCHAR
or whatever, how do you handle string literals? On NT L"foobar" gives each
character 2 bytes, but on Unix L"foobar" uses 4 bytes per character. Even
worse I suspect is the AS/400 where the string literal is probably in
EBCDIC.

Thanks,

Bob
Bob_Jones@jdedwards.com



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:06 EDT