Technical data
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-2022-JP
The charset field in the preceding example specifies the mail interchange
codeset, in this case, ISO-2022-JP. This codeset is an ISO 7-bit
state-dependent codeset for Japanese characters. Codesets other than
those that are part of the ISO standard are identified by the prefix X- in
the codeset name. For example, when DEC Hanyu is the codeset used for
mail interchange, the following header lines are included in outgoing mail
messages:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-dechanyu
The mailx command and MH commands determine the application codeset
and set the mail interchange codeset for incoming and outgoing messages
based on certain values. The following lists describe, in priority order of
highest to lowest, the values these commands use.
• The application codeset is determined from one of the following:
1. The setting of the LANG environment variable
2. The value of the lang component in the $HOME/.mailrc file (for
the mailx command) or the $HOME/.mh_profile file (for MH
commands)
• The mail interchange codeset applied to incoming messages is
determined from one of the following:
1. The charset field in the mail header, if additional header lines are
present in the message
2. The codeset specified as the system-wide mail interchange default in
the /usr/lib/mail-codesets file
If you create this file, make sure it contains the name of a locale
as the only entry.
If neither of the preceding values is available, codeset conversion does
not occur.
• The mail interchange codeset applied to outgoing messages is determined
from one of the following:
1. The setting of the EXCODE environment variable
2. The setting of the excode component as defined in the
$HOME/.mailrc file (for mailx users) or the $HOME/.mh_profile
file (for users of MH commands)
Working in a Multilanguage Environment 1–27










