scientifichackers / ampy

MicroPython Tool - Utility to interact with a MicroPython board over a serial connection.
MIT License
723 stars 157 forks source link

Correct stdout_write_bytes for UTF-8 chars. #106

Open codemee opened 3 years ago

codemee commented 3 years ago

On branch master Your branch is up to date with 'origin/master'.

Changes to be committed: modified: ampy/pyboard.py

The original implementation of stdout_write_bytes() is writing the output byte by byte. This would break the multi-bytes UTF-8 char into mutiple single byte chars and cause problems with non ascii chars.

I modify the implementation to output char by char according to the UTF-8 encoding.