is utf-8 the standard filename encoding?

Rodney Dawes rodney.dawes at canonical.com
Wed Dec 21 15:37:47 UTC 2011


On Wed, 2011-12-21 at 13:51 +1100, Martin Pool wrote:
> We have a question in <https://bugs.launchpad.net/bugs/794353> and
> <http://bugs.python.org/issue13643> about what encoding bzr and Python
> ought to assume for file names if there is no locale configured.
> 
> As a specific example, if you run a Python program from cron, it has
> no locale by default.  It tries to decode filenames as ascii.  If it
> encounters a non-ascii filename, it will likely crash.  People hit
> this kind of thing a lot with bzr; we have put in a workaround but it
> seems it would be better to fix it in Python.

What is the workaround you're using? This doesn't seem like a problem
with Python, so much as a system configuration, and possibly a test
isolation problem.

I think running without the locale set is a good thing, because it
exposes problems you might not normally hit, but which can be an issue.
This is particularly true in the case of filename encodings. It is very
often mis-configured, which is why glib and so many pieces of software
have complicated workarounds to deal with the problems.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20111221/06176a46/attachment.pgp>


More information about the ubuntu-devel mailing list