lancaster-university / codal-microbit-v2

CODAL target for the micro:bit v2.x series of devices
MIT License
41 stars 50 forks source link

Should scrolling/printing out-of-range characters on the display be an "error glyph" #425

Open microbit-carlos opened 3 months ago

microbit-carlos commented 3 months ago

This might be considered a breaking change, and so, we might not want to change this.

The issue is that when trying to scroll or print UTF-8 long characters, like , we end up with 3 empty characters (UTF-8 encoding is 0xEAB08E), which might make it look like the screen animation has ended.

Having an "error character" instead of a white space means that at least it shows something unexpected but a bit more obvious, that doesn't resemble a latin letter. My first thought would be that people might already be used to see squares or the replacement character .

microbit-carlos commented 2 months ago

@JohnVidler suggested we could also have this a config option with space by default.

microbit-carlos commented 2 months ago

Some discussion about a possible implementation if we decide to do this: