The special characters map to custom glyphs in my font. However, the encoding seems to get mangled when compiled and flashed to the Arduino. If i open the .ino file in Sublime Text, it opens as UTF-8. If i reopen it with an ASCII encoding, all the special characters take up double the space (2 width) which messes up the rendering on the Arduino.
How can i make sure these are encoded as their proper ASCII value? For example, ± should be 0xB1.
I have tried "\0xB11 SP INIT POSIT " and "\0X"" 1 SP INIT POSIT " but that doesn't do anything. "\xB11 SP INIT POSIT " messes up the display instead.
Sorry, i didn't mean ASCII then, whatever you would call 0x00 - 0xFF. The values come in over serial like this, and i need to be able to print 0xB1 and so on locally while debugging, so i need a way to write it in the strings.
Yes, but in the text-encoding world. Whatever we decide to call it, i need to mix raw bytes with strings, how can i do that? Like so "\0xB1 SP INIT POSIT "
Notice the lack of space between \xB1 and the second 1. How can i tell the compiler that i am "finished" with hex other than using a space which i dont want there?
No, I have glyphs for 0x20-0xBB and am getting such bytes over serial, that works. However, for debugging purposes i need to be able to store such strings in the sketch.