Skip to content

fix utf8 output #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix utf8 output #74

wants to merge 1 commit into from

Conversation

pmp-p
Copy link
Contributor

@pmp-p pmp-p commented Apr 10, 2022

actually in the repl :
print( b'\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x90'.decode() )

does not ouput ┌─┐ as expected

it seems xterm.js expects native utf-16 javascript strings.

edit/ if target IS a normal xterm.js probably best to send raw bytes to it instead as in #77

actually in the repl :
print( b'\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x90'.decode() )

does not ouput ┌─┐ as expected
@tiran
Copy link
Collaborator

tiran commented Apr 24, 2022

I merged the browser-ui into CPython repo a while ago. Could you please make a PR against https://github.com/python/cpython/blob/main/Tools/wasm/python.html ?

@pmp-p
Copy link
Contributor Author

pmp-p commented Apr 26, 2022

Could you please make a PR against https://github.com/python/cpython/blob/main/Tools/wasm/python.html ?

no it was just a quick fix for here. TTY handling is way more complicated than that.

>>> sys.stdout.isatty()
False

@pmp-p pmp-p closed this Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants