Skip to content

Commit

Permalink
core.restart: When converting strings to unicode, use mbcs so that no…
Browse files Browse the repository at this point in the history
…n-ASCII characters get converted properly instead of throwing an exception.

This means that NVDA now restarts itself correctly (e.g. after changing the configured language) when it is located in a directory which contains non-ASCII characters.
Fixes #2079.
  • Loading branch information
jcsteh committed Feb 7, 2012
1 parent 65b6566 commit f3740b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ def restart():
"""Restarts NVDA by starting a new copy with -r."""
import subprocess
import shellapi
shellapi.ShellExecute(None,None,unicode(sys.executable),unicode(subprocess.list2cmdline(sys.argv+['-r'])),None,0)
shellapi.ShellExecute(None, None,
sys.executable.decode("mbcs"),
subprocess.list2cmdline(sys.argv + ["-r"]).decode("mbcs"),
None, 0)

def resetConfiguration():
"""Loads the configuration, installs the correct language support and initialises audio so that it will use the configured synth and speech settings.
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Highlights of this release include features for more fluent reading of braille;
- Double reporting of property page text has been suppressed in some cases. (#218)
- Improved tracking of the caret in editable text fields which rely on text written to the screen. In particular, this improves editing in the Microsoft Excel cell editor and the Eudora message editor. (#1658)
- In Firefox 11, the move to containing virtual buffer command (NVDA+control+space) now works as it should to escape embedded objects such as Flash content.
- NVDA now restarts itself correctly (e.g. after changing the configured language) when it is located in a directory which contains non-ASCII characters. (#2079)


== Changes for Developers ==
Expand Down

0 comments on commit f3740b0

Please sign in to comment.