Jump to content




Unicode Character Support


6 replies to this topic

Poll: Good Idea? (9 member(s) have cast votes)

Good Idea?

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote

#1 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 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.

#2 ChunLing

  • Members
  • 2,027 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.

#3 faubiguy

  • Members
  • 213 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).

#4 Orwell

    Self-Destructive

  • Members
  • 1,091 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.

#5 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 03 December 2012 - 07:08 PM

View Postfaubiguy, on 03 December 2012 - 03:42 PM, said:

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?

#6 faubiguy

  • Members
  • 213 posts

Posted 03 December 2012 - 08:44 PM

View PostDlcruz129, on 03 December 2012 - 07:08 PM, said:

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
À


#7 Y.Petremann

  • New Members
  • 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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users