On 15-Feb-10 22:08:22, Chris G wrote:
I have an E-Mail (well lots actually) which has a text part with headers as follows:-
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
My system is all utf-8 now so just outputting the E-Mail via 'more' or opening it in vi doesn't decode/show the accented characters correctly.
Mutt reads the above headers and converts the accented characters and shows them correctly.
I want to do some processing on this file and then display the text parts but at the moment I can't get anything to do what mutt appears to be able to do with no effort! E.g. I have tried:-
iconv -f iso-8859-1 <filename>
and it doesn't change anything at all. Nor does viewing the file in Firefox with the charset set to iso-8859-1 work.
What am I missing? It must be something blatantly obvious.
Quite possibly ... According to 'man iconv' you should need *both* -f and -t: SYNOPSIS iconv -f encoding -t encoding inputfile Also, "iconv --list" lists the charset names in CAPITALS. . So maybe try iconv -f ISO-8859-1 -t UTF-8 <filename> It also lists ISO-8859-1, ISO8859-1 and ISO_8859-1 which are presumably equivalent [... ??]. Shooting not-quite-in-the-dark (illumination from 'man'), since I've never used this! Hoping this helps, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 15-Feb-10 Time: 22:37:12 ------------------------------ XFMail ------------------------------