lua-users home
lua-l archive

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


Joshua Jensen wrote:
[...]
LuaPlus achieves this via a C-like string representation:

HelloWorld = L"Hello world!"

Yes, that sounds like a good solution --- that lets you distinguish between bag-of-bytes strings and Unicodish strings, which means you don't have to worry about conflicting requirements as much.

What does LuaPlus do for things like string comparison and surrogates?

[...]
I apologize for hijacking the thread, but I really do feel it is useful to have wide character string support for my work within the games industry. For applications, wide characters may be worthless.

Do any of them use UTF-8?

I work in mobile games; our company makes a portable native gaming solution that allows you to install C-based games on any device, regardless of architecture. The API's based on OpenKODE, which uses UTF-8 in the few places where it uses strings. As I tend to do the bottom-end porting to weird and freaky embedded operating systems, I've got tiresomely familiar with having to translate UTF-8 to whatever encoding the host OS uses. There are a surprising number that use some form of half-assed UCS-2, and I've never figured out why --- it just makes life complex. I suspect that it's simple tradition. Most of them come from Asia, and Asia seems to have a culture of using UCS-2 or UTF-16...

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ ⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)⋎M⋏2=T←⊃+/(V⌽"⊂M),(V⊝"M),(V,⌽V)⌽"(V,V←1⎺1)⊝"⊂M)'
│ --- Conway's Game Of Life, in one line of APL