Re: [Python-Dev] Add a new "locale" codec?

2012年2月08日 05:35:01 -0800

On Wed, Feb 8, 2012 at 3:25 PM, Victor Stinner
<[email protected]> wrote:
> The current locale is process-wide: if a thread changes the locale,
> all threads are affected. Some functions have to use the current
> locale encoding, and not the locale encoding read at startup. Examples
> with C functions: strerror(), strftime(), tzname, etc.
Could a core part of Python breaking because of a sequence like:
1) Encode unicode to bytes using locale codec.
2) Silly third-party library code changes the locale codec.
3) Attempt to decode bytes back to unicode using the locale codec
(which is now a different underlying codec).
?
Schiavo
Simon
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to