Post Reply 
newRPL: Adding string processing commands?
09-06-2017, 12:48 AM
Post: #18
RE: newRPL: Adding string processing commands?
(09-05-2017 08:51 PM)Claudio L. Wrote:  
(09-02-2017 08:16 PM)smartin Wrote:  My thinking is as follows:

#61h is the UTF8 encoding for the printable character "a" (compatible with the smaller subset of the older ASCII encoding, which is what we have on the 50g stock ROM). So if I want to convert TO the UTF8 encoding, wouldn't I want the command to be →UTF8? And if I wanted to convert to the equivalent character from the UTF8 encoding, UTF8→?

Correct reasoning, minor conceptual error. UTF8 is the encoded string, while the numbers are Unicode Code Points, those are the characters which can be encoded in UTF8, UTF16, UTF32, etc. Therefore →UTF8 converts Code Points into UTF8 encoded strings, and vice versa.
#61h is the code point, the UTF8 encoded string is "a" (UTF8 encodes ASCII as plain ASCII, only complex characters like → have other weird encoding).

Is it obvious that I don't deal with UTF8 regularly?

Thanks for the clarification and explanation, it makes sense now.

Steve
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: Adding string processing commands? - smartin - 09-06-2017 12:48 AM



User(s) browsing this thread: 1 Guest(s)