nmh-workers
[Top] [All Lists]

[Nmh-workers] More fun with charset functions

2014-05-05 12:03:35
Right now we have two charset functions: get_charset() and
write_charset_8bit() (I claim no responsibility for the current state of
affairs; it's been that way since the dawn of nmh).

get_charset() returns the "local" character set indicated by the locale.
This is relatively straightforward.

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".

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.

Thoughts?

--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>