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

jsutils.c -> escapeCharacter() not escaping values > =0x7F #780

Closed
dmcnaugh opened this issue Jan 9, 2016 · 1 comment
Closed

jsutils.c -> escapeCharacter() not escaping values > =0x7F #780

dmcnaugh opened this issue Jan 9, 2016 · 1 comment

Comments

@dmcnaugh
Copy link

dmcnaugh commented Jan 9, 2016

Looking at the following terminal output (using the WebIDE):

>'\x00'
="\x00"
>'\x19'
="\x19"
>'\x20'
=" "
>'\x7F'
="�"
>'\xFF'
="ÿ"
> 

You can see that characters from 0x00 - 0x19 are correctly escaped but values from 0x7F to 0xFF are not, although these should be considered non-printable or non-ascii

This has adverse effects on things like dump(); that send non-printable/non-ascii values to the console.

A simple change on a single line should fix it.

49.    if (ch<32) {

becomes

49.    if (ch<32 || ch>=127) {
@gfwilliams
Copy link
Member

Thanks - I'm a bit busy today but I'll fix that during the week.

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