[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] show's checkmime

From: Valdis . Kletnieks
Subject: Re: [Nmh-workers] show's checkmime
Date: Fri, 21 Jan 2005 14:43:20 -0500

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 
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: pgpmzKw57UPfz.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]