lua-users home
lua-l archive

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


I'd like to write an application that operates on text, including string 
containing accented letters such as "è" (I hope it shows correctly, it's an 
accented "e").

My users could have either ISO-8859-1 or UTF-8 Unicode as their system default 
(I can detect this, even if probably not in a portable way). I'd like code 
such as the line below to work anyway:

  if s == "caffè" then print("perché?") end

Is there a simple way? (assuming the program is written using ISO-8859-1, i.e. 
one character = one byte)
I suppose the problem is not unfamiliar in Brazil...

  Enrico