MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 430 forks source link

OpenOS motd unicode.char using utf-16be codes #2640

Closed grandmaster8 closed 6 years ago

grandmaster8 commented 6 years ago

in docks it is written that unicode.char works with utf 8

payonel commented 6 years ago

unicode.char takes a unicode value and returns a utf8 string motd is using 0x2552, 0x2550, 0x2555, 0x2502, 0x2514, 0x2500, 0x2518

I don't see a mistake here. Could you explain what I'm missing?

grandmaster8 commented 6 years ago

You want to say that unicode.char gets any unicode format code and converts it to utf 8?

skyem123 commented 6 years ago

It takes a codepoint number and converts it to a UTF-8 string that represents that codepoint. That codepoint number is sort of UTF-32, but it isn't really that, because it's a number, not a string.

payonel commented 6 years ago

this doesn't appear to be a bug. if you have further questions about unicode codepoints, feel free to ask for clarification on our irc channel, #oc on esper.net

skyem123 commented 6 years ago

it's #oc :P

payonel commented 6 years ago

oc ...