Fix MicroPython badly handling unicode chars (#2018)

## Changes

  * fixed an issue with the **py-editor** related to the new `linebuffer` directive
  * provide in worker hook scope a simple callback that pre-buffers unicode sequences [accordingly to the standard](https://encoding.spec.whatwg.org/#utf-8-bytes-needed) so that the buffer is sent to the terminal only once those sequences are fulfilled
  * test with both `µ` and way more convoluted sequences such as 👩‍❤️‍👨 that the output, if either requested as input or already evaluated from the page works ... in latter case `test = "👩‍❤️‍👨"` completely messes up the program and the resulting string is empty
This commit is contained in:
Andrea Giammarchi
2024-04-09 14:51:10 +02:00
committed by GitHub
parent 6ee8217593
commit 2d5cf096e0
5 changed files with 49 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@pyscript/core",
"version": "0.4.16",
"version": "0.4.18",
"type": "module",
"description": "PyScript",
"module": "./index.js",
@@ -42,7 +42,7 @@
"dependencies": {
"@ungap/with-resolvers": "^0.1.0",
"basic-devtools": "^0.1.6",
"polyscript": "^0.12.2",
"polyscript": "^0.12.3",
"sticky-module": "^0.1.1",
"to-json-callback": "^0.1.1",
"type-checked-collections": "^0.1.7"