environment may not be in get_user_encoding() on Windows
Bug #262874 reported by
Mark Hammond
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Martin Packman |
Bug Description
As discussed on the bzr mailing list: On Windows the 'mbcs' encoding should be used to translate environment strings to Unicode. The 'mbcs' encoding uses the Windows API to perform the conversion, which is how Windows itself does the same conversions. The value returned by the locale module for get_user_encoding() may or may not be appropriate - but 'mbcs' should always be.
Solution isn't that trivial as a fair bit of the code assumes get_user_encoding can be used - but is is probably the same as we are heading for with host_names etc - an osutils function to query the environment and return Unicode objects.
Related branches
lp:~gz/bzr/get_environ_unicode_262874
- Vincent Ladeuil: Approve
-
Diff: 111 lines (+83/-2)2 files modifiedbzrlib/tests/test_win32utils.py (+53/-0)
bzrlib/win32utils.py (+30/-2)
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: win32 |
Changed in bzr: | |
status: | Triaged → Confirmed |
summary: |
- enviroment may not be in get_user_encoding() on Windows + environment may not be in get_user_encoding() on Windows |
Changed in bzr: | |
assignee: | nobody → Martin Packman (gz) |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.5b5 |
status: | In Progress → Fix Released |
To post a comment you must log in.