nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] show's checkmime

2005-01-21 12:55:09
On Fri, 21 Jan 2005 19:55:19 +0100, Oliver Kiddle said:

UTF-8 is just as compatible with plain 7bit ASCII so I'll make the
change in the attached patch.

Seems sane, except for one little detail.  There's the corner case where
(for instance) the $LANG is set to something like fr_FR.UTF-8 (which means
that the system understands UTF-8, but it's quite possible that for actual
display, we can't be sure that we have all UTF-8 codeplanes available.  Such
a user may have done 'export MM_CHARSET="$LANG";', so we might want to check
if UTF-8 is found anywhere in the string:

+       if (!strncasecmp("ISO-8859-", mm_charset, 9) ||
+               strstr(mm_charset,"UTF-8")) {

What do people think?

Shouldn't the code somehow be using nl_langinfo(CODESET) instead of the
MM_CHARSET environment variable?

The only reason it doesn't is because MM_CHARSET was created before 
nl_langinfo()
existed.  Also, we may still be advertising the ability to build it in some old
crufty environments that don't have nl_langinfo() *yet*, so we may need to have
an #ifdef/#else/#endif and some ./configure magic (or heave said environments
from last century over the side and be done with it.. ;)

Attachment: pgpdAvsPuropl.pgp
Description: PGP signature

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] Current Thread [Next in Thread>