RFC 2047 MIME header decoding for postgresql
This currently contains a single function that will decode RFC 2047 encoded email headers from using either Q or B encoding.
steve=# select decode_rfc_2047(E'=?_ISO-8859-1?Q?Rapha=EBl_Dupont?=');
decode_rfc_2047
-----------------
Raphaël Dupont
(1 row)
psql -f pgmime.sql
Once the function is installed you can run the pgtap
based tests with psql -Xf test.sql
It'd be nice to have some variants of encode_rfc_2047() too.