<<< Date Index >>>     <<< Thread Index >>>

Re: How does mutt choose charset encoding when sending messages?



Hello Kyle,

 On Monday, March 20, 2006 at 8:56:41 -0500, Kyle Wheeler wrote:

> Mutt runs your message through iconv to determine which charset it is.

    Mutt already knows the charset of the composed text: $charset. To
determine the best sending charset it loop iconvs from $charset to each
of $send_charset. The 1st conversion without error wins. If all fail,
fallback to $charset.

    So to follow your pseudo code, it would be more like:

| for candidate in $send_charset; do
|     iconv -f $charset -t $candidate $message
|     if [ $? == 0 ]; then
|         break;
|     fi
| done

    The Swedish file saved in Latin-1 is invalid GB2312: No conversion
can succeed. So Mutt fallbacks to sending without conversion with a
GB2312 label.


Bye!    Alain.
-- 
When you want to reply to a mailing list, please avoid doing so with
Lotus Notes 5. This lacks necessary references and breaks threads.