demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Demexp-dev] Character encoding


From: Thomas Petazzoni
Subject: Re: [Demexp-dev] Character encoding
Date: Mon, 22 Oct 2007 10:13:34 +0200

Hi,

Le Mon, 22 Oct 2007 09:18:23 +0200,
"David MENTRE" <address@hidden> a écrit :

> I'm not sure of that. If you look at the Unicode table for Latin1
> (http://www.unicode.org/charts/PDF/U0080.pdf), the encoding of é is
> 00E9 (p. 7).

I'm not sure too :-)

On a system with LANG=fr_FR, I run a Python interpreter:

>>> s = u"citoyennet\xe9"
>>> s
u'citoyennet\xe9'
>>> print s
citoyenneté

 -> It is displayed correctly.

>>> s.encode('utf-8')
'citoyennet\xc3\xa9'

And here we have the string encoded in utf-8.

>>> print s.encode('utf-8')
citoyenneté

 -> It is not displayed correctly

But even with that, I'm still not sure to understand completely. These
encodings issues are really tough to grasp.

Sincerly,

Thomas
-- 
Thomas Petazzoni - address@hidden
http://{thomas,sos,kos}.enix.org - http://www.toulibre.org
http://www.{livret,agenda}dulibre.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]