]> diplodocus.org Git - nmh/commitdiff
Completely deprecate support for MM_CHARSET.
authorKen Hornstein <kenh@pobox.com>
Mon, 20 Jan 2014 06:15:55 +0000 (01:15 -0500)
committerKen Hornstein <kenh@pobox.com>
Mon, 20 Jan 2014 06:15:55 +0000 (01:15 -0500)
docs/contrib/ml
docs/pending-release-notes
man/mh-profile.man
man/mhbuild.man
man/mhshow.man
man/scan.man
man/show.man
sbr/check_charset.c
test/common.sh.in
test/scan/test-scan-multibyte

index f5796c4..66bcf10 100755 (executable)
@@ -117,7 +117,7 @@ do_viewhtml()
        > /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$$
index cfe66e3..288b567 100644 (file)
@@ -109,6 +109,9 @@ OBSOLETE FEATURES
   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
index 9f0190f..47c5928 100644 (file)
@@ -783,48 +783,6 @@ additional user profile (file) to be read by
 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
index 2f0e8ee..9dbf05a 100644 (file)
@@ -448,7 +448,9 @@ If a text content contains any 8\-bit characters (characters with the
 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
index f55fbfe..9cc44c1 100644 (file)
@@ -328,15 +328,15 @@ encounters a \*(lqcharset\*(rq parameter for
 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
index b9c94f4..17a702c 100644 (file)
@@ -73,9 +73,12 @@ these scan listings.
 .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 ,
index c69a7d7..04589fb 100644 (file)
@@ -92,14 +92,15 @@ specify a transfer encoding (such as MIME quoted-printable or
 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
index e43459e..4f2eeba 100644 (file)
@@ -8,9 +8,8 @@
  */
 
 #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));
 }
 
 
index 13db440..be8b25d 100644 (file)
@@ -23,7 +23,7 @@ test -z "$MH_INST_DIR"  &&  MH_INST_DIR="${MH_TEST_DIR}/inst"
 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
index c78a4d2..76b0a8c 100755 (executable)
@@ -104,7 +104,7 @@ if test "$ICONV_ENABLED" -eq 1; then
 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
 
@@ -132,12 +132,12 @@ else
     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
@@ -153,7 +153,7 @@ properly count it when decoding, which could be seen with:
 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"