[Mailman-i18n] Unicode in headers

Dan Ohnesorg Dan@feld.cvut.cz
Sat, 21 Sep 2002 22:12:28 +0200


Dne Sat, Sep 21, 2002 at 01:00:43PM -0400, Barry A. Warsaw napsal:

>     from email.Header import Header
>     h =3D Header(u'[P\xf6stal]', 'us-ascii')
>     s =3D str(h)
>=20
> what would you expect the value of s to be?

Somethink like =3D?utf-8?Q?P=3Df6stal?=3D

According to RTF we should find the most simple encoding, which is UTF8.

In czech we use ISO-8859-2 and we check if there are only ASCII character=
s =3D
we are using ascii, or if there are some other characters we are using
ISO-8859-2. So the way can be:

- are there only ASCII characters =3D OK let it be
- are there only characters from locale preferred encoding =3D use locale
encoding
- in other cases, use UTF.


cheers
dan


--=20
  -----------------------------------------------------------
 / Dan Ohnesorg                              Dan@ohnesorg.cz \
<  Jino=E8ansk=E1 7                        252 19  Rudn=E1 u Prahy  >
 \ tel: +420 311 679679 +420 311 679976 fax: +420 311 679311 /
  -----------------------------------------------------------