environment may not be in get_user_encoding() on Windows

Bug #262874 reported by Mark Hammond on 2008-08-30
Affects Status Importance Assigned to Milestone
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

Jelmer Vernooij (jelmer) on 2009-06-18
Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Jelmer Vernooij (jelmer) on 2009-06-18
tags: added: win32
Martin Pool (mbp) on 2010-03-18
Changed in bzr:
status: Triaged → Confirmed
Vincent Ladeuil (vila) on 2010-12-03
summary: - enviroment may not be in get_user_encoding() on Windows
+ environment may not be in get_user_encoding() on Windows
Martin Packman (gz) on 2011-12-05
Changed in bzr:
assignee: nobody → Martin Packman (gz)
status: Confirmed → In Progress
Martin Packman (gz) on 2011-12-12
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  Edit
Everyone can see this information.

Other bug subscribers