Everything you did not want to know about Unicode in Python 3

wxjmfauth at gmail.com wxjmfauth at gmail.com
Wed May 14 03:00:25 EDT 2014


Le mardi 13 mai 2014 10:08:45 UTC+2, Johannes Bauer a écrit :
> On 13.05.2014 03:18, Steven D'Aprano wrote:
> 
> 
> 
> > Armin Ronacher is an extremely experienced and knowledgeable Python 
> 
> > developer, and a Python core developer. He might be wrong, but he's not 
> 
> > *obviously* wrong.
> 
> 
> 
> He's correct about file name encodings. Which can be fixed really easily
> 
> wihtout messing everything up (sys.argv binary variant, open accepting
> 
> binary filenames). But that he suggests that Go would be superior:
> 
> 
> 
> > Which uses an even simpler model than Python 2: everything is a byte string. The assumed encoding is UTF-8. End of the story.
> 
> 
> 
> Is just a horrible idea. An obviously horrible idea, too.
> 
> 
> 
> Having dealt with the UTF-8 problems on Python2 I can safely say that I
> 
> never, never ever want to go back to that freaky hell. If I deal with
> 
> strings, I want to be able to sanely manipulate them and I want to be
> 
> sure that after manipulation they're still valid strings. Manipulating
> 
> the bytes representation of unicode data just doesn't work.
> 
> 
> 
> And I'm very very glad that some people felt the same way and
> 
> implemented a sane, consistent way of dealing with Unicode in Python3.
> 
> It's one of the reasons why I switched to Py3 very early and I love it.
> 
> 
> 
> Cheers,
> 
> Johannes
> 
> 
> 
> -- 
> 
> >> Wo hattest Du das Beben nochmal GENAU vorhergesagt?
> 
> > Zumindest nicht öffentlich!
> 
> Ah, der neueste und bis heute genialste Streich unsere großen
> 
> Kosmologen: Die Geheim-Vorhersage.
> 
>  - Karl Kaos über Rüdiger Thomas in dsa <hidbv3$om2$1 at speranza.aioe.org>

===========

A Rob 'Commander' Pike will never put utf16 and
ebcdic in the same basket, when discussing coding
of characters.

jmf




More information about the Python-list mailing list