lua-users home
lua-l archive

Re: lua for unicode

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


> As for the core Lua lib, it's mostly string width independent
> I believe, although a quick search across the source produces a 
> number of calls to things like strlen in routines like 
> lua_pushstring, lua_dostring, luaO_chunkid, luaS_new, and 
> luaV_strcomp.
lua_pushstring is auxiliar (as you pointed out); the same for
lua_dostring (the "official" luaL_loadbuffer gets a size). luaS_new
and luaO_chunkid may need some rework.
> What is this call luaV_strcomp used for?
It does string-order comparison: "hi" <= "hello". Yes, this one breaks
an external Unicode system. Suggestions?
> I also see the use of strcpy in a number of places. I was 
> under the impression Lua was string width independent but maybe
> I was wrong.
We try to make it string width independent, but it is difficult to
ensure that. We will try to improve that (maybe after 5.0 beta).
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /