6
Well, I realized that in Lua, you can’t use accented letters.
print("á")
Returns an invalid character. Is there any way to avoid this?
6
Well, I realized that in Lua, you can’t use accented letters.
print("á")
Returns an invalid character. Is there any way to avoid this?
10
It is totally possible, but you need to define the appropriate locale. For this you can make use of the function os.setlocale (locale \[, category\])
that will set the locale for the program:
Example:
os.setlocale("pt_PT")
or
os.setlocale("pt_PT.iso88591")
You can see the example on Ideone.
If none is defined, the system one is used.
Browser other questions tagged lua
You are not signed in. Login or sign up in order to post.
What system are you using? This is much more related to your system than the language itself. For example if you test in Codepad or even in some calculators with Lua support you will get the way you want:
á
– Mansueli