From: Stephen Lewis Date: 2003-04-02T14:13:13+09:00 Subject: Re: parsing/decoding mail/news headers --=.0n0dhRBI:.0Sbm Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, 2 Apr 2003 07:48:37 +0900 Martin Pirker wrote: > In RMail in found header/address parsing functions (nice stuff!), but > I still havn't figured out how to decode the header parts which have > been encoded for 7-bit(?) compatibility, >=20 > e.g. given > Subject: =3D?ISO-8859-1?Q?Erg=3DE4nzung?=3D >=20 > should decode to > Subject: Erg=E4nzung >=20 > (that's a german word) > I guess this has something to do with quoted-printable or MIME - are > there some lib functions which do this or how do you do it? I believe this is on the RMail todo list, but if you want to have a go = at doing it yourself, the format is defined in RFC2047 - It's a MIME "encod= ed-word". =20 I started playing with something to decode these a couple of weeks back= , a partial solution on top of RMail using some (fairly) simple parsing cod= e and iconv (or in my case ruby/gnome2 :) isn't too difficult. I'd be interested if anyone else has a complete solution to this (i.e. = deals with all the places in the various headers where you could possibly h= ave this type of encoding, as well as doing the actual decoding and checkin= g that only allowed characters are used in "Q" encodings depending on the h= eader, etc etc etc) My solution is far too messy, and, well, nasty to share atm, but I'll p= robably be going back to it and tidying it up over the next few weeks for a= n MUA I'm playing with writing. --=20 Stephen Lewis slewis@paradise.net.nz --=.0n0dhRBI:.0Sbm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+inCiIgTEtLC7U/IRApnaAKCHLNK9j1h+SB0wFVLfnAfOpzE6wQCdGyGO YZWfmolOqbrYTdHdMqjaWYU= =IH7C -----END PGP SIGNATURE----- --=.0n0dhRBI:.0Sbm--