microsoft / microsoft/pxt-microbit

German umlauts / French accented characters break serial output

Open
#4,467 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted localization P2 serial
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug
Using German umlauts (üäöÜÄÖ) or French accented characters (éèàÉÈÀ) breaks serial output from the microbit to the linked (webusb) makecode editor window. (The same output from the simulator however works fine).

Writing/sending a string of text (serial.write_line) containing such characters does not produce the expected output in the web console of the browser.

To Reproduce
Create a program that outputs the aforementioned characters.

serial.write_line("-- start") serial.write_line("Word (no umlauts)") serial.write_line("Wörd (German umlaut") serial.write_line("Wérd (French accent)") serial.write_line("end -- ")

Expected behavior
The console output in the makecode editor window should output the characters as stated in the code.
Alternatively, the umlaut/accented characters should be substituted with an icon showing that the character cannot be shown (a question mark or a square, for instance).

Screenshots
The code:
image

The result (from real micro:bit)
image

micro:bit version (please complete the following information):
V2 (no others available to test)

Desktop (please complete the following information):

  • OS: MacOS 12.0.1
  • Browser : Chrome
  • Version: 97.0.4692.99

Smartphone (please complete the following information):

Additional context
serial.writeValue("Wörd", 0) is also affected: Using serial.writeValue with a string containing umlauts will not output/graph the value in the makecode editor browser window.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with serial.write_line and serial.writeValue using the accented strings, comparing real micro:bit output with the simulator and the MakeCode browser console. Done means the console preserves those characters, or consistently displays a clear replacement when they cannot be shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
embedded-iot, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.