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

Projects
None yet
6 participants
@Andre9642
Contributor

Andre9642 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)
`ui.browseableMessage()`: Fix an Unicode problem when NVDA is install…
…ed in a path containing a non-ASCII character.
@leonardder

This comment has been minimized.

Collaborator

leonardder commented Aug 4, 2017

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

@derekriemer

This comment has been minimized.

Collaborator

derekriemer commented Aug 11, 2017

This needs code review and should be relatively easy.

@leonardder leonardder requested a review from feerrenrut Oct 12, 2017

@leonardder

This is a one liner

@feerrenrut

This comment has been minimized.

Contributor

feerrenrut commented Oct 16, 2017

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)
@Andre9642

This comment has been minimized.

Contributor

Andre9642 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

This comment has been minimized.

Contributor

feerrenrut commented Nov 1, 2017

Great, I'll incubate this change.

feerrenrut added a commit that referenced this pull request Nov 1, 2017

Incubate #7474
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

@Andre9642 Andre9642 deleted the Andre9642:ui_browseableMessage branch Dec 5, 2017

@feerrenrut feerrenrut removed their request for review Feb 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment