From: Rocco Rutte Date: Wed, 1 Jul 2009 21:24:36 +0000 (+0200) Subject: Manual: Add detailed section on charset handling X-Git-Tag: neomutt-20160307~500 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf61b7777120d01501b00ad9be3be910f756fc5d;p=neomutt Manual: Add detailed section on charset handling --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index e3c1e1ce5..31f78dc2c 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -4408,6 +4408,51 @@ set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%* %s" Advanced Usage + +Character Set Handling + + +Mutt supports all character sets the system supports which can be +determined by running locale -a. A character +set is basically a mapping between bytes and glyphs and implies +a certain character encoding scheme. For example, for the ISO 8859 +family of character sets, an encoding of 8bit per character is used. For +the Unicode character set, different character encodings may be used, +UTF-8 being the most popular. + + + +Since Mutt is a command-line tool run from a shell, and delegates +certain tasks to external tools (such as an editor for composing/editing +messages), all of these tools need to agree on a character set and +encoding. There exists no way to reliably deduce the character set a +plain text file has. Interoperability is gained by the use of +well-defined environment variables. The full set can be printed by +issueing locale on the command line. + + + +Upon startup, Mutt determines the character set on its own using +routines that inspect locale-specific environment variables. Therefore, +it is generally not necessary to set the $charset +variable in Mutt. It may even be counter-productive as Mutt uses system +and library functions that derive the character set themselves and on +which Mutt has no influence. It's safest to let Mutt work out the locale +setup itself. + + + +Warning: A mismatch between what these functions think the locale is and +what mutt was told what the locale is may make it behave badly with +non-ascii input. This warning is to be taken seriously since not only +local mail handling may suffer: sent messages may carry wrong character +set information the receiver has too deal with. The +need to set $charset directly in most cases points at +terminal and environment variable setup problems, not Mutt problems. + + + + Regular Expressions