nmh-workers
[Top] [All Lists]

Re: mhfixmsg character set conversion

2022-02-10 05:51:52
Hi Steven,

   - explicitly unset LC_ALL and set LANG to en_CA.UTF-8
...
unset LC_ALL; LANG="en_CA.UTF-8"; export LC_ALL LANG

The export of LC_ALL is a bit misleading.  AFAICT it doesn't do any harm
as LC_ALL isn't set, but it would read better not to be there IMO.

Also, this is assuming either all the other LC_* are unset or that it's
desired they trump LANG.  Precedence is

    LC_ALL
    LC_CTYPE, LC_NUMERIC, etc.
    LANG

Anyway, locale(1) is a good way to test you're getting the desired
result.

   - run ~smw/bin/decode_headers using $source as stdin (this explicitly
     decodes headers which are RFC 2047-encoded, and passes the body
     through unchanged)

This sounds like the kind of thing which might insert bytes which alter
vim's idea of the ‘fileencoding’.  Given

    To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>

as taken from RFC 2047, is it going to put in a byte 0xf8 for ISO 8859-1
encoding, or 0xc3 0xb8 for UTF-8?

-- 
Cheers, Ralph.

<Prev in Thread] Current Thread [Next in Thread>