[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_tolstring and wide character strings
- From: Miles Bader <miles@...>
- Date: Fri, 14 Aug 2009 20:41:39 +0900
Bulat Ziganshin <bulat.ziganshin@gmail.com> writes:
>> Recently I was manipulating wide character strings in a Lua library.
>> Windows API assumes these strings to end with L'\0' which is represented
>> as 2 successive zero bytes. The problem is, lua_tolstring guarantees
>> only 1 zero byte at the end (according to the manual):
>
> i think that idea that you may hold utf-16 strings in Lua strings is
> wrong by itself. you should make specialized datatype
Exactly.
-Miles
--
"She looks like the wax version of herself."
[Comment under a Paris Hilton fashion pic]