[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua for unicode
- From: "Changhan Lee" <changhan@...>
- Date: Mon, 2 Dec 2002 17:45:20 +0900
oh, sorry i'm confused in understanding microsoft's wide character and utf-8 format,
i just thought it looks impossible in lua to read 2-byte wide character formatted file.
and i have misunderstanding that all unicode is 2-byte array,
i found it's possible to save lua file to UTF-8 format, because all lua keywords and tokens are ascii characters,
and just read string from lua table without any other string operation was ok.
i used MultiByteToWideChar/WideCharToMultiByte win32 functions to read string from lua table, and worked fine.
( am i doing right with this functions? first i converted UTF-8 multibyte to widechar, and then converted widechar version string to ANSI and i know this solution can't display all different language characters at same time )
but i'm still confusing, UTF-8 format is not wide character version, and it's unicode,
and microsoft's wide character isn't unicode?
UTF-8 is multi-byte and microsoft's wide character is 2-byte array..
i want to work together to support UTF-8 in lua, but i'm still newbie in this field yet.
and checking if char is greater than 127 in all string loops looks not good at performance..
(wide character version looks more easy in string operation)
and finally, i'm korean, currently doing to support korean and japanese in my game, and sorry for poor english :)