lua-users home
lua-l archive

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


> I want to prepare a program that need table field names
> with accented characters.

You have to set the correct locale before loading your programs.
That can be done in your app or in Lua. The code below will show
an error in the first loadstring but it will succeed in the second.
--lhf

S=[[
Entrada1 {
    título = "Algún libro",         -- simple
    año = 1992
}                                                                               
]]

print(loadstring(S))
print(os.setlocale"es_ES")
print(loadstring(S))