]> 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 f5796c4ed24f4e14c351f702c6ec66149622d175..66bcf10d478e2dad6b354d91632e56c53babf379 100755 (executable)
@@ -117,7 +117,7 @@ do_viewhtml()
        > /tmp/ml-mhshow-html$$
 
     MHSHOW=/tmp/ml-mhshow-html$$ \
        > /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$$
        mhshow -type text/html "$@"
 
     rm -f /tmp/ml-mhshow-html$$
index cfe66e3aa5603ff4ac686276f4ba5675f955e191..288b5674efdcad4ef0ff2d7cf26f9403792d8a57 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.
   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
 
 -------------------
 DEPRECATED FEATURES
index 9f0190f56d89b06adbc64a90da324d6c5e214eb9..47c592830ff99e9b4f40b9bd6c8d318769dbe1cb 100644 (file)
@@ -783,48 +783,6 @@ additional user profile (file) to be read by
 in addition to the mhn.defaults profile.
 .RE
 .PP
 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
 .B $MAILDROP
 .RS 5
 This variable tells
index 2f0e8ee7b21c675159c1e0001178a1beb002ff82..9dbf05a8b40e7fc86d7dc17a61d7acf6ba6f5162 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
 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
 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 f55fbfe6a4bf71ae2981df5ba049186b6bdb0d23..9cc44c1b83597c52f68c3a011b7ae79de6f509f7 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
 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
 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 mhshow
 will assume a value of \*(lqUS-ASCII\*(rq.
 If the character set cannot be displayed natively, then
index b9c94f48df0a63ef74c093fa92e4cf2d007221a5..17a702caee89c1c6cceebe6a38b9a98bebc0f45c 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.
 .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 ,
 .PP
 The switch
 .BR \-reverse ,
index c69a7d7551c7d951d824289c26d27058c10f0a53..04589fb6769be0c0fbfa527b184241eac4483a29 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
 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
 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
 .PP
 The option
 .B \-checkmime
index e43459ef6a41c23b180fc3971927aa84e9233a15..4f2eeba9c7b5242b4b062aab0cd926c5e7f24aa7 100644 (file)
@@ -8,9 +8,8 @@
  */
 
 #include <h/mh.h>
  */
 
 #include <h/mh.h>
-#ifdef HAVE_LANGINFO_H
-# include <langinfo.h>
-#endif
+
+#include <langinfo.h>
 
 
 /*
 
 
 /*
 char *
 get_charset ()
 {
 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 13db440a004a14f95c01cfa19c4c56ad2b4c89e4..be8b25dfb046491df8362a454b68ed337954c4d3 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
 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
 
 #### Use a test dir for tmp files when MHTMPDIR applies.
 MHTMPDIR=$MH_TEST_DIR/Mail
index c78a4d2e0fc45b0560cd1d3840f5b07691a8037a..76b0a8c77391c3fdcb339bacf5b75c1836d2f1cf 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.
 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
 
     check "$expected" "$actual"
 fi
 
@@ -132,12 +132,12 @@ else
     echo "Unsupported width for U+2019: $width"
 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
 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
 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
 
 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"
 
 
 check "$expected" "$actual"