JSON.stringify() and char code 128 #1361
Replies: 3 comments
-
Posted at 2020-02-29 by @MaBecker Looks like 128: € is treated special, because 129 : 0xfc : ü works.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-03-01 by @gfwilliams 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 For now I'd manually specify it - either fromCharCode as you have done, or |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-03-01 by @MaBecker Thanks, that is exactly what I am using now.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-02-29 by @MaBecker
How should this be coded?
Beta Was this translation helpful? Give feedback.
All reactions