Yes, it's a hack to allow unicode on Espruino (where it isn't natively supported). The IDE detects unicode, does the conversion, and uploads pre-converted code.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, it's a hack to allow unicode on Espruino (where it isn't natively supported). The IDE detects unicode, does the conversion, and uploads pre-converted code.
I think the issue you have is that the Euro symbol isn't actually part of the 0-255 character range: https://en.wikipedia.org/wiki/Euro_sign
I guess in an ideal world that hack in the IDE would be configurable - you could choose if you wanted UTF8 encoding, or
ISO10646-1
, or something else.For now I'd manually specify it - either fromCharCode as you have done, or
\x80