On Mon, Feb 22, 2010 at 08:07:56PM +0100, Vincent van Ravesteijn - TNW wrote: > Depends.exe says: > > "class QString QString::fromWCharArray(unsigned short const *,int)" > > So, qt defines/typedefs wchar_t as unsigned short ??
No, that's not Qt, but Windows, in msvcrt.h if memory serves right. > A simple google search says > > " Pretty much every important string function has both a > narrow and a wide string version, and every one would have to be > wrapped in a #if USE_WCHAR_T block otherwise." > > But Qt has only a short one defined ? No, Qt uses the wchar_t of the platform for the to/fromWChar functions to communicate with wchar_t based functions of the host system. On Windows that's a 16 bit type, on *nix traditionally 32 bit. QString is internally UTF-16 on all platforms. Andre'
