Skip to content
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

non-ascii character symbol #25

Closed
amaurydar opened this issue Sep 5, 2018 · 3 comments
Closed

non-ascii character symbol #25

amaurydar opened this issue Sep 5, 2018 · 3 comments

Comments

@amaurydar
Copy link

show `$"\240";

Nothing is displayed if I do this in a notebook, while it works in the console.

The notebook log says

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 26: invalid start byte
@jhanna-kx
Copy link
Collaborator

jhanna-kx commented Sep 6, 2018

Hi,
Yes the character encoding for notebooks is utf-8 so all output must be valid Unicode, we could handle invalid cases like this by attempting to decode in the kernel before sending to the notebook front end,

e.g.

q)decode:{.p.eval["bytes"][`:decode;<]["x"$x;`errors pykw `backslashreplace]}
q)decode"\240"
"\\xa0"

If that works for you we'll add it in the next release

@amaurydar
Copy link
Author

Yes that works great.

Thanks!

@jhanna-kx
Copy link
Collaborator

this was added to release 1.1.3

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

No branches or pull requests

2 participants