Yes I'm familiar with iconv (and libiconv), but to be able to convert UTF8 to what the (binary !) characters originally were, one needs to know the character encoding of the platform the UTF8 was generated on. That encoding was used to transform 0xF9 and oxF0 characters in the corresponding UTF8 characters and is needed to properly specify the 'decoding' libiconv must perform.
It remains unexplainable that a string declared as
x="\x0c\x05\x81\x00 \x07\x00\xF9\xF0\x0E\x00@"
gets transformed into something UTF8 :
'\f\x05\x81\0 \x07\0ùð\x0E\0@'
Why not just leave binary valued characters in strings as they are ? After all, the string for a drawImage call is not really a string anyhow ...
(Just an opinion of someone totally unfamiliar with the inner workings of Espruino and the Web IDE.)
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 I'm familiar with iconv (and libiconv), but to be able to convert UTF8 to what the (binary !) characters originally were, one needs to know the character encoding of the platform the UTF8 was generated on. That encoding was used to transform 0xF9 and oxF0 characters in the corresponding UTF8 characters and is needed to properly specify the 'decoding' libiconv must perform.
It remains unexplainable that a string declared as
gets transformed into something UTF8 :
Why not just leave binary valued characters in strings as they are ? After all, the string for a drawImage call is not really a string anyhow ...
(Just an opinion of someone totally unfamiliar with the inner workings of Espruino and the Web IDE.)