lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Joshua Jensen wrote:
----- Original Message -----
From: David Given
Date: 10/14/2009 8:31 PM
Joshua Jensen wrote:
[...]
LuaPlus achieves this via a C-like string representation:

HelloWorld = L"Hello world!"
What does LuaPlus do for things like string comparison and surrogates?
It does the equivalent of wcscmp(), only it doesn't rely on the C runtime to achieve this. That's because on some non-Visual C++ compilers, sizeof(wchar_t) != 2. sizeof(lua_WChar) is always 2.

My understanding is that UCS-2 doesn't support surrogates. I don't think Microsoft's C runtime wide character library supports them either. I could be wrong.

WinNT kernel doesn't know anything about UTF-16 it's pure UCS-2 coded ;) so, it's a myth that Windows is Unicode aware