I've been trying all night to get extended characters working in the font engine, but nothing makes sense. I've got a routine which splits the string of text to be drawn up into characters, and then converts that to a decimal ID number. This routine is a port of the same one used in PHP when generating the font so that the IDs will match.
Now, if I force the string to be drawn to something containing special characters then it draws fine. For example, I can draw the text "pokémon Ω" to the screen and the characters are correctly decoded to their IDs, matched to the IDs in the font table, and then the characters are drawn on the screen.
However, if the data comes from the SMDH file (e.g. a HB app with its SMDH file changed to read "pokémon Ω" then the special characters display incorrectly. The characters they are showing up as are the ones represented by the second UTF-8 byte of those characters, indicating that the first byte is being ignored.
I'm wondering whether this is something to do with unicodeToChar() which is defined in utils.h and seems to be called when the SMDH data are extracted. However, I don't understand the code in this function so wouldn't know where to start, or even if this is the right place to look.
Any help much appreciated!