[Zope-dev] Character codes

sergey2b sergey2b@mail.ru
Thu, 11 Nov 1999 22:18:06 +0300


add in z2.py

#z2.py
import locale
locale.setlocale(locale.LC_ALL, "fr")

-----Original Message-----
From: Hannu Krosing <hannu@tm.ee>
To: Alexandre Ratti <alex@gabuzomeu.net>
Cc: zope-dev@zope.org <zope-dev@zope.org>
Date: 11 ÎÏÑÂÒÑ 1999 Ç. 21:56
Subject: Re: [Zope-dev] Character codes


>Alexandre Ratti wrote:
>>
>> Hello,
>>
>> when displaying the raw content of a list with this code:
>>
>>    <dtml-call "REQUEST.set('myOptionList',['é', 'à', 'ù', 'è'])">
>>    <dtml-var myOptionList>
>>
>> (The list values are extended characters for French accented letters.
They
>> may not display correctly in your mailer.)
>>
>> I get this output:
>>
>>    ['\351', '\340', '\371', '\350']
>
>I guess it is called iso-8559-1 ?
>
>what you see are octal (NON)ASCII codes for the characters.
>
>The list is composed of 4 one-character strings, each shown as its octal
>code if outside the range 32 <= x < 127
>
>-----------------
>Hannu
>
>_______________________________________________
>Zope-Dev maillist  -  Zope-Dev@zope.org
>http://lists.zope.org/mailman/listinfo/zope-dev
>           No cross posts or HTML encoding!
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
>
>
>