nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] nmh internals: full MIME integration

2014-07-30 09:38:24
Because the libc routines are at the mercy of the locale.  If someone
is using, say, and 8859-x based locale, the libc code isn't necessarily
going to do the right thing with utf8, and we cannot stomp on the locale
as that would potentially break the displayed output.

Alright, I see your point ... but which routines do we use _on raw email
input_ that are affected by the locale?  (let's assume a CTE of 8bit for
simplicity's sake).  I know that printf(), scanf(), and others are affected,
but when reading email we use fread().  The character tests we use like
isspace() are used in the format engine, but only when we don't have iconv
support; they're generally working on characters that have been converted
to the local character set.  I see they're also used to parse the config
files.

Actually, let me amend that ... isspace() is used in m_getfld(), when reading
headers.  I suppose in theory we should replace that with specific tests
rather than using isspace(); we don't handle the case where a locale says
0x00-0x7F does not match ASCII (are there such locales?).

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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