[Fwd: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces]

Jan Matejek jmatejek at suse.cz
Fri Apr 24 07:13:58 PDT 2009


Toshio Kuratomi napsal(a):
> 
> Next:  "What is the problem?"  Currently, python-3.x is broken for all
> *nix systems WRT unicode and 1) environment variables, 2) command-line
> arguments because there's no way to access env vars and command line
> args that are not in the default system encoding.  It is less than
> optimal for things that touch the filesystem since using the normal,
> string-oriented API will lead to silently not seeing filenames which are
> not in the default system encoding.  Using the byte API always will see
> the filenames but the programmer has to know to do this (and then the
> programmer has to translate into strings as appropriate).
(...)
> This means that there will be a lot of code that will work when I code
> it on my pure utf-8 system but once distributed to someone in China
> using Big5 for some filenames and utf-8 for others, will suddenly break.
>   Worse, the bug reports will be pretty mysterious: "Foo-app fails to
> show all my files".

big thankyou for this explanation! living on a pure utf-8 system myself,
 i was not aware that there even is a problem.
now that i know what is this PEP trying to solve, i can follow the
discussion and understand the subtleties :) that should've been
mentioned in the PEP in the first place... oh well.

> 
> Ramifications to look for: How will this affect programmers?  Will they
> be able to make easy mistakes that fail in corner cases that we care
> about?  Will mixed encodings make things fail?  Does using the Private
> Use Area conflict with the ways that we, as distributions, use the
> Private Use Areas?  Will we still have to spend a lot of time submitting
> patches to upstream projects for non-obvious bug reports?

fortunately it seems that python devs are aware of those issues and
working to resolve them in a manner that is useful to us (i.e. no impact
on programmers and everything "just works")
but i'll be following the mailing list closely

thanks
m.

> 
> -Toshio
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Distributions mailing list
> Distributions at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/distributions



More information about the Distributions mailing list