default fsenc patch

Martin Packman martin.packman at canonical.com
Mon Jan 23 23:06:18 UTC 2012


This was <http://bugs.python.org/issue13643> for anyone not following
along at the time.

On 23/01/2012, Martin Pool <mbp at canonical.com> wrote:
>
> I wonder if we should actually follow the course of upstream Python
> and just insist the user set eg LANG=C.UTF-8 if they have UTF-8 names,
> and just focus on giving clear messages when names can't be decoded.

Perhaps. The two main areas of pushback from upstream were:

1) This is a linux distro problem, it's better to fix the defaults
there than in Python
2) Python 3 has the PEP 383 'surrogateescape'  hack to work with
bytestring names

Neither of these particularly apply the bzr, though it seems like
ubuntu at least should have a usable locale in more situations these
days.

Ideally, we'd fix the bazaar filesystem code to work neatly with bytes
on nix rather than requiring all filenames to decode cleanly the
current locale. That's feasible, but a lot of work and won't happen
for 2.5 - but the remaining ui when running in a non-utf-8 locale are
more achievable by then.

Martin



More information about the bazaar mailing list