when porting my Visual C ++ project to GCC, I found that the default wchar_t data type is 4 bytes UTF-32. I could override this with the compiler option, but then the whole part of the wcs * (wcslen, wcscmp, etc.) RTL turns out to be unusable, since it assumes 4-byte strings.
Currently, I have reworked 5-6 of these functions from scratch and #defined my implementations. But is there a more elegant option - say, a GCC RTL assembly with a 2-byte wchar-t sitting quietly somewhere waiting for a connection?
The specific flavors of GCC I came to are Xcode on Mac OS X, Cygwin, and the one that comes with Debian Linux Etch.
source
share