Skip to content

Update readline.c for REPL Unicode issue 1905 #2631

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

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Update readline.c for REPL Unicode issue 1905 #2631

merged 1 commit into from
Feb 18, 2020

Conversation

DavePutz
Copy link
Collaborator

@DavePutz DavePutz commented Feb 18, 2020

The issue reported in #1905 was that UTF-8 characters were not getting echoed in REPL. This was because the code in readline.c made sure the character was 'printable', i.e. between 32 and 126 inclusive. For UTF-8 the character can go up to 255, so simply removing the upper test resolves the issue. A simple test:

>>> a='27° C'
>>> print (a)
27° C

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the simple fix @DavePutz! I look forward to emojis in the REPL :-)

@tannewt tannewt merged commit 6f06f92 into adafruit:master Feb 18, 2020
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