> /tmp/ml-mhshow-html$$
MHSHOW=/tmp/ml-mhshow-html$$ \
- MM_CHARSET=us-ascii \
+ LC_ALL=C \
mhshow -type text/html "$@"
rm -f /tmp/ml-mhshow-html$$
ap(8) commands has been removed.
- "make install" no longer strips executables. Use "make install-strip"
instead.
+- The environment variable MM_CHARSET to indicate the native character
+ set is no longer supported. The native character set will be solely
+ determined by the locale settings.
-------------------
DEPRECATED FEATURES
in addition to the mhn.defaults profile.
.RE
.PP
-.B $MM_CHARSET
-.RS 5
-With this environment variable, you can specify
-the native character set you are using. You must be able to display
-this character set on your terminal.
-.PP
-This variable is checked to see if a RFC 2047 header field should be
-decoded (in
-.BR inc ,
-.BR scan ,
-.BR mhl ).
-This variable is
-checked by
-.B show
-to see if the
-.I showproc
-or
-.I showmimeproc
-should
-be called, since showmimeproc will be called if a text message uses
-a character set that doesn't match
-.BR $MM_CHARSET .
-This variable is
-checked by
-.B mhshow
-for matches against the charset parameter
-of text contents to decide it the text content can be displayed
-without modifications to your terminal. This variable is checked by
-.B mhbuild
-to decide what character set to specify in the charset
-parameter of text contents containing 8\-bit characters.
-.PP
-When decoding text in such an alternate character set,
-.B nmh
-must be able to determine which characters are alphabetic, which
-are control characters, etc. For many operating systems, this
-will require enabling the support for locales (such as setting
-the environment variable
-.B $LC_CTYPE
-to iso_8859_1).
-.RE
-.PP
.B $MAILDROP
.RS 5
This variable tells
high bit set) and the character set is not specified as above, then
.B mhbuild
will assume the character set is of the type given by the
-environment variable MM_CHARSET. If this environment variable is not
+standard
+.IR locale (1)
+environment variables. If these environment variables are not
set, then the character set will be labeled as \*(lqx-unknown\*(rq.
.PP
If a text content contains only 7\-bit characters and the character set
this content, it checks if your terminal can display this character
set natively.
.B mhn
-checks this by examining the environment
-variable
-.BR $MM_CHARSET .
-If the value of this environment variable is equal
+checks this by examining the current character set defined by the
+.IR locale (1)
+environment variables.
+If the value of the locale character set is equal
to the value of the charset parameter, then
.B mhshow
assumes it can
-display this content without any additional setup. If this environment
-variable is not set,
+display this content without any additional setup. If the locale is not
+set properly,
.B mhshow
will assume a value of \*(lqUS-ASCII\*(rq.
If the character set cannot be displayed natively, then
.B Scan
will only decode these fields if your
terminal can natively display the character set used in the encoding.
-You should set the MM_CHARSET environment variable to your native
-character set, if it is not US-ASCII. See the mh-profile(5) man
-page for details about this environment variable.
+You should set the appropriate
+.IR locale (1)
+environment variables to your native
+character set, if it is not US-ASCII. See
+.IR locale (1)
+for more details on the appropriate environment variables.
.PP
The switch
.BR \-reverse ,
base64) or specify a character set that
.B show
doesn't believe
-can be displayed natively. The environment variable
-.B $MM_CHARSET
+can be displayed natively. The appropriate
+.IR locale (1)
+environment variables
should be set to the terminal's native character set to avoid
gratuitous invocations of the
.IR showmimeproc .
See the
-.IR mh-profile (5)
-man page for details about this environment variable.
+.IR locale (1)
+man page for details about these environment variables.
.PP
The option
.B \-checkmime
*/
#include <h/mh.h>
-#ifdef HAVE_LANGINFO_H
-# include <langinfo.h>
-#endif
+
+#include <langinfo.h>
/*
char *
get_charset ()
{
- char *charset = getenv ("MM_CHARSET");
-#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
- if (!charset)
- charset = norm_charmap(nl_langinfo (CODESET));
-#endif
- return charset;
+ return norm_charmap(nl_langinfo (CODESET));
}
export MH_INST_DIR
unset MHBUILD MHCONTEXT MHMTSUSERCONF MHN MHSHOW MHSTORE
-unset MHLDEBUG MHPDEBUG MHWDEBUG MM_CHARSET PAGER
+unset MHLDEBUG MHPDEBUG MHWDEBUG PAGER
#### Use a test dir for tmp files when MHTMPDIR applies.
MHTMPDIR=$MH_TEST_DIR/Mail
EOF
# Don't use run_prog here because it loses those environment settings.
- LC_CTYPE=ISO-8859-1 MM_CHARSET=ISO-8859-1 scan -width 75 last >"$actual"
+ LC_ALL=en_US.ISO8859-1 scan -width 75 last >"$actual"
check "$expected" "$actual"
fi
echo "Unsupported width for U+2019: $width"
fi
-LC_CTYPE=en_US.UTF-8 MM_CHARSET=UTF-8 scan -width 75 last >"$actual"
+LC_ALL=en_US.UTF-8 scan -width 75 last >"$actual"
check "$expected" "$actual"
cat >"$expected" <<EOF
- 13 01/13 sender@example.co ? <<The Subject: is an encoded single quote, 0x9
+ 13 01/13 sender@example.co <<The Subject: is an encoded single quote, 0x92.
EOF
cat >"${MH_TEST_DIR}/Mail/inbox/13" <<EOF
The scan listing was two characters too long.
EOF
-LC_CTYPE=ISO-8859-1 MM_CHARSET=ISO-8859-1 scan -width 80 last >"$actual"
+LC_ALL=en_US.ISO8859-1 scan -width 80 last >"$actual"
check "$expected" "$actual"