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

ui.browseableMessage(): Fix an Unicode problem when NVDA is installed in a path containing a non-ASCII character #7474

Merged
merged 1 commit into from
Nov 23, 2017

Conversation

aaclause
Copy link
Contributor

@aaclause aaclause commented Aug 4, 2017

If NVDA is installed in a path containing a non-ASCII character (eg: éè), ui.browseableMessage() fails.

>>> import ui
>>> ui.browseableMessage('test')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "ui.pyo", line 49, in browseableMessage
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 7: ordinal not in range(128)

…ed in a path containing a non-ASCII character.
@LeonarddeR
Copy link
Collaborator

Looks great and sensible, only one line of changed code, so I'd suggest merging this directly into master

@derekriemer
Copy link
Collaborator

This needs code review and should be relatively easy.

Copy link
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

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

This is a one liner

@feerrenrut
Copy link
Contributor

Overall this looks good. Could you please describe the testing that has been done. In particular I want to see that the following has been tested:

Test the following with and without non-ASCIIcharacters:

  • Standard installation
  • Portable installation
  • Running from launcher (inside a folder with / without non-ASCII characters)

@aaclause
Copy link
Contributor Author

aaclause commented Nov 1, 2017

Hello,
I've just tested. I generated a build with this change.
Everything works for me! :)

1/ I have moved the launcher archive in a folder with non-ASCII characters (C:\André).
2/ I have run the launcher archive and I launched the Python Console.
I typed this input: import ui; ui.browseableMessage(u'éèçtest').
3/ I created a portable installation (in C:\André\çéèâ).
4/ I started the portable copy and I reiterated with the Python Console and with an add-on.

@feerrenrut
Copy link
Contributor

Great, I'll incubate this change.

feerrenrut added a commit that referenced this pull request Nov 1, 2017
Merge remote-tracking branch 'origin/pr/7474' into next
@michaelDCurran michaelDCurran merged commit 5b475a8 into nvaccess:master Nov 23, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.4 milestone Nov 23, 2017
@aaclause aaclause deleted the ui_browseableMessage branch December 5, 2017 15:09
@feerrenrut feerrenrut removed their request for review February 6, 2018 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants