nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] More fun with charset functions


From: David Levine
Subject: Re: [Nmh-workers] More fun with charset functions
Date: Mon, 05 May 2014 22:53:01 -0400

> write_charset_8bit() claims to return the character set that should be
> used when writing 8bit characters (usage bears this thinking out; this
> is only used when we want to indicate a charset for 8-bit characters).
> However, in practice what that means is it will return whatever
> get_charset() returns, unless it returns NULL ... in that case, it will
> return "x-unknown".

I don't think that get_charset() can return NULL, because I don't
think that nl_langinfo() can.  (As an aside, nl_langinfo() can
return an empty string, but I don't think nl_langinfo(CODESET)
will, at least in practice.)

> This seems wrong to me.  I guess the question I'm asking is: if the
> locale specifies US-ASCII is the character set but we detect 8-bit
> characters, what should be putting as the character set?  US-ASCII is
> definitely wrong (that's what we do now). x-unknown seems slightly less
> wrong, but I'm not in love with it.  "Aborting with an error" is a
> possible answer, but I'm not in love with that idea either.

This thread might help:

http://lists.gnu.org/archive/html/nmh-workers/2006-08/msg00000.html

David



reply via email to

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