From: David Levine Date: Sat, 24 Sep 2016 01:54:26 +0000 (-0400) Subject: Renamed mhbuild -headerencoding 8bit to utf-8. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/f29bbf35b2de1893a3e383943f813cbc4f41960b?ds=inline;hp=a2c417d3e1641ba4ab151b7945b90f55176705b1 Renamed mhbuild -headerencoding 8bit to utf-8. --- diff --git a/man/mhbuild.man b/man/mhbuild.man index c1237a75..7667b3a3 100644 --- a/man/mhbuild.man +++ b/man/mhbuild.man @@ -768,10 +768,9 @@ The valid arguments are for based\-64 encoding, .I quoted for quoted\-printable encoding, and -.I 8bit -for raw 8-bit encoding, which requires that all header field bodies be -encoded as UTF-8 (RFC 6530) and that the SMTP server support SMTPUTF8 -(RFC 6531). +.I utf-8 +which requires that all 8-bit header field bodies be encoded as UTF-8 +(RFC 6530) and that the SMTP server support SMTPUTF8 (RFC 6531). The .B \-autoheaderencoding switch will instruct diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 3b57f20c..f8b98f23 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -86,7 +86,7 @@ getname (const char *addrs) pers = mbox = host = route = grp = note = NULL; err[0] = '\0'; - if ((ap = getadrx (addrs ? addrs : "", eai && strncasecmp (eai, "8bit", 4) == 0)) == NULL) { + if ((ap = getadrx (addrs ? addrs : "", eai && strncasecmp (eai, "utf-8", 5) == 0)) == NULL) { return NULL; } diff --git a/test/post/test-rfc6531 b/test/post/test-rfc6531 index 1df9a291..48d9d155 100755 --- a/test/post/test-rfc6531 +++ b/test/post/test-rfc6531 @@ -22,7 +22,7 @@ require_locale en_US.utf-8 en_US.utf8 LC_ALL=en_US.UTF-8; export LC_ALL #### Enable EAI in mhbuild, via the profile. -sed "s%^\(mhbuild: .*\)%\1 -headerencoding 8bit%" "$MH" >"$MH.new" +sed "s%^\(mhbuild: .*\)%\1 -headerencoding utf-8%" "$MH" >"$MH.new" mv -f "$MH.new" "$MH" # check SMTPUTF8 basic diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 8684c70f..87252a7c 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -56,11 +56,11 @@ DEFINE_SWITCH_ENUM(MHBUILD); DEFINE_SWITCH_ARRAY(MHBUILD, switches); #undef X -/* 8bit is Email Address Internationalization. */ +/* utf-8 is for Email Address Internationalization, using SMTPUTF8. */ #define MIMEENCODING_SWITCHES \ X("base64", 0, BASE64SW) \ X("quoted-printable", 0, QUOTEDPRINTSW) \ - X("8bit", 0, EIGHTBITSW) \ + X("utf-8", 0, UTF8SW) \ #define X(sw, minchars, id) id, DEFINE_SWITCH_ENUM(MIMEENCODING); @@ -246,7 +246,7 @@ main (int argc, char **argv) case QUOTEDPRINTSW: header_encoding = CE_QUOTED; break; - case EIGHTBITSW: + case UTF8SW: header_encoding = CE_8BIT; break; default: diff --git a/uip/post.c b/uip/post.c index 6e2367a4..488d49b7 100644 --- a/uip/post.c +++ b/uip/post.c @@ -597,8 +597,8 @@ main (int argc, char **argv) /* Support EAI. */ if (eai) { - /* Add eai profile entry, to pass 8bit setting to getname()/getadrx(). */ - add_profile_entry ("eai", "8bit"); + /* Add eai profile entry, to pass utf-8 setting to getname()/getadrx(). */ + add_profile_entry ("eai", "utf-8"); } start_headers (); diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 5da67fc9..6373336e 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -104,15 +104,15 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st, buildvec[i++] = "-dist"; buildvec[i++] = (char *) drft; if (eai) { - /* Add eai profile entry, to pass 8bit setting to + /* Add eai profile entry, to pass utf-8 setting to getname()/getadrx(). This doesn't seem to be necessary - now, but it's here just in case the code changes - later. */ - add_profile_entry("eai", "8bit"); + now, but it's here just in case the code changes + later. */ + add_profile_entry("eai", "utf-8"); - /* Add mhbuild switch to enable 8bit headers. */ + /* Add mhbuild switch to enable UTF-8 headers. */ buildvec[i++] = "-headerencoding"; - buildvec[i++] = "8bit"; + buildvec[i++] = "utf-8"; } buildvec[i] = NULL; execvp(buildprogram, buildvec);