1619 posts
Posted 03 December 2012 - 09:02 AM
So, I wanted to translate my Operating System to Spanish, German, Etc. but ComputerCraft doesn't have Unicode Character Support. Is this a limitation of Forge, or could this be added? It would be really useful for translations. Thanks.
2005 posts
Posted 03 December 2012 - 10:52 AM
Pretty sure there was an old thread that this was confirmed to be in the works…but hasn't come out yet.
231 posts
Posted 03 December 2012 - 03:42 PM
I like the idea, but a limitation is that the lua
string library wouldn't directly work with Unicode strings, because Lua strings use 8-bit characters (CC uses ASCII), and Unicode uses 16-bit characters (For variable-width encodings like UTF-8, it depends on the character being encoded, but that doesn't make manipulating Unicode strings any easier).
1054 posts
Posted 03 December 2012 - 04:47 PM
The extended ASCII set could be used. It has most of those foreign characters (not like chinese/japanese/korean/arabic/… though). It also has a lot of typically useless characters (rectangles, corners, lines), but those could actually be useful in ComputerCraft.
1619 posts
Posted 03 December 2012 - 07:08 PM
I like the idea, but a limitation is that the lua
string library wouldn't directly work with Unicode strings, because Lua strings use 8-bit characters (CC uses ASCII), and Unicode uses 16-bit characters (For variable-width encodings like UTF-8, it depends on the character being encoded, but that doesn't make manipulating Unicode strings any easier).
You're saying that in standard Lua, print("À") won't work?
231 posts
Posted 03 December 2012 - 08:44 PM
You're saying that in standard Lua, print("À") won't work?
The lua specification does not specify a character encoding to use, only that it uses 8 bits per character.
With the lua 5.1 standalone interpreter, the code
print("À")
will fail to compile when encoded UTF-8 or UCS-2, and when encoded in ASCII, instead prints
À
10 posts
Posted 04 December 2012 - 03:09 PM
I don't really agree with Unicode support since it's more dificult to work with Unicode ( UTF-x ) than with ASCII, since for now ComputerCraft don't have a full ASCII support and since /font/default.png font can be easily monospaced and that not pretty good for Unicode charset.