environment may not be in get_user_encoding() on Windows

Bug #262874 reported by Mark Hammond
4
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.

Tags: win32

Related branches

Jelmer Vernooij (jelmer)
Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Jelmer Vernooij (jelmer)
tags: added: win32
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Vincent Ladeuil (vila)
summary: - enviroment may not be in get_user_encoding() on Windows
+ environment may not be in get_user_encoding() on Windows
Martin Packman (gz)
Changed in bzr:
assignee: nobody → Martin Packman (gz)
status: Confirmed → In Progress
Martin Packman (gz)
Changed in bzr:
milestone: none → 2.5b5
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.