UnicodeDecodeError issue

wxjmfauth at gmail.com wxjmfauth at gmail.com
Tue Sep 3 11:23:55 EDT 2013


Le lundi 2 septembre 2013 16:44:34 UTC+2, MRAB a écrit :
> On 02/09/2013 13:24, Dave Angel wrote:
> 
> > On 2/9/2013 07:56, MRAB wrote:
> 
> >
> 
> >> On 02/09/2013 12:38, Dave Angel wrote:
> 
> >
> 
> >     <snip>
> 
> >
> 
> >>> ¶γνωστοόνομα συστήματος
> 
> >>>
> 
> >>> I don't have a clue what it might be;  it's not English, and I don't
> 
> >>> know whatever language it may be in.
> 
> >>>
> 
> >> You don't recognise Greek?
> 
> >
> 
> > I recognize most of those as Greek characters, but as I said, I don't
> 
> > know Greek.  And because I can't recognize words, I can't assume it
> 
> > might not be some other language that uses the same glyphs.
> 
> >
> 
> I don't know Greek either, and I don't think there's any other language
> 
> that uses the Greek alphabet.
> 
> 
> 
> >>
> 
> >>> Does that string make any sense to you?  You may want to try it on your
> 
> >>> own machine, since the email may obscure the encoding.  Or you might
> 
> >>> want to do the decode using whatever the default encoding is for that
> 
> >>> server.
> 
> >>>
> 
> >>> The Linux 'file' utility thinks this string is in ISO-8859, so you might
> 
> >>> want to try a decode('ISO-8859-1') as well.  (and maybe  ISO-8859-2, -3,
> 
> >>> -4, and -5)
> 
> >>>
> 
> >> It's ISO-8859-7 (Greek).
> 
> >

--------

The Latin alphabet uses Greek lettering.

The Cyrillic alphabet uses Greek lettering.

Greek: One should not confuse modern Greek
with ancient Greek, polytonic Greek full
of diacritics.

Plenty of European languages (~15) based on the Latin
alphabet uses some ancient Greek diacritics.

Now unicode.

Everything is working very smoothly with the endorsed coding
schemes of Unicode.org.

Expectedly it fails (behaves badly) with Python and its 
Flexible Sting Representation, mainly because it relies on
the latin-1 (iso-8859-1) set.

To take the problem the other way, one can take these
linguistic ascpects to illustrate the wrong design of
the FSR.

jmf




More information about the Python-list mailing list