[Pkg-mailman-hackers] Bug#303173: mailman: mailpasswds improperly encodes pl/cronpass.txt in Unicode when sending password reminder.

Artur R. Czechowski arturcz at hell.pl
Sun Dec 11 14:50:34 UTC 2005


On Sun, Dec 11, 2005 at 12:29:30PM +0100, Lionel Elie Mamane wrote:
> tags 303173 +moreinfo
> thanks
> You wrote:
> > File received by email looks like:
> > ---
> > To jest przypomnienie, wysy=142ane raz na miesi=105c, o tym, =17Ce jeste=
> > =15B
> > ---
> 
> > Additionaly, mail headers are:
> > Content-Type: text/plain; charset="iso-8859-2"
> > Content-Transfer-Encoding: quoted-printable
> I don't see the problem; this looks like quoted-printable encoding and
> the mail headers say quoted-printable encoding. Where does Unicode
> come in here, and what do you expect the email attachment to look
> like? Please explain.
=142, =105, =17C, =15B is not a proper quoted printable encoding.
Let's look at the word "miesiąc" (encoded above as a "miesi=105c"). 2nd last
character is described at: http://nl.ijs.si/gnusl/cee/charset.html
as: <a;>  /xB1  <U0105>  LATIN SMALL LETTER A WITH OGONEK
In ISO-8852-2 it has a code B1. In quoted printable it is encoded as =B1.
And sequence =B1 should be put in place of character "ą" if header says:
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
So, word "miesiąc" is encoded as "miesi=B1c".

In Unicode it has a code U0105. In UTF-8 documents it is encoded as a pair
of bytes: (196,133)dec or (C4,85)hex. So, if you prefer to send your
document using UTF-8 with quoted printable you should put in headers:
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
And the word is "miesi=C4=85c".

If, in any case, you want to send an email in Big Endian UTF-16 with QP
(it's really bad idea, OTOH), headers should be:
Content-Type: text/plain; charset="utf-16"
Content-Transfer-Encoding: quoted-printable
And the word is "=00m=00i=00e=00s=00i=01=05=00c".
(I am not sure about the Content-Type header).

But there is no case that letter "ą" is encoded as =105! Quoted Printable
encodes single bytes, not combinations of them.

Best regards
	Artur
-- 
Mężczyźni lepiej sprawdzają się w pracy zarobkowej, kobiety w pracach domowych
(np. małe stopy służą temu, by stać bliżej zlewozmywaka). 
				/znalezione na news:pl.rec.humor.najlepsze/




More information about the Pkg-mailman-hackers mailing list