-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
NVDA fails to start when temp path contains certain multibyte characters #2729
Comments
Comment 1 by mdcurran on 2012-10-18 10:50 |
Comment 2 by jteh on 2012-10-19 02:30 |
Comment 3 by jteh on 2012-10-19 06:58 |
Comment 4 by jteh on 2012-10-31 00:29 |
Comment 5 by mdcurran on 2013-02-01 18:47 |
Comment 6 by nvdakor on 2014-06-08 17:01 |
Comment 7 by nvdakor on 2014-06-08 17:20
|
Reported by mdcurran on 2012-10-18 10:42
Python's tempfile.get_default_tempdir() normalizes case on all candidate temp paths. If the path happens to contain multibyte characters this is bad as changing case completely destroys the original value of the path.
For example: the unicode string "川山" is encoded in CP932 (Japanese) as "\x90\xec\x8eR".
If this string is run through os.path.normcase, the final "R" is converted to "r" which is very wrong.
In the end if none of the candidate temp paths can be used due to this reason, or because some of them simply cannot be written to, then tempfile.gettempdir() raises an error and NVDA fails to start.
Its worth noting that if deleting the user's temp and tmp environment variables to try and get around this, the temp path falls back to c:\windows\temp. NVDA also fails hear but not for the reason above. It fails here simply because it cannot create its log file in this directory due to lack of permissions. This particular issue should be handled in a separate ticket.
The text was updated successfully, but these errors were encountered: