{"thread":{"id":"19409","subject":"[PATCH 3/8] builtin-mailinfo.c: compare character encodings case insensitively","startedAt":"2009-05-18T23:44:37Z","lastAt":"2009-05-18T23:44:45Z","messageCount":9,"participants":["Brandon Casey"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"114210","messageId":"KfeKNR3Jm6YKvPIcYGBMpCbbOxxIaBRphS4qzgN2W9mXIvp7Hl8SgBQzbAhZRV4A4Q6X14JTLR4@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":null,"subject":"[PATCH 0/8] character encoding portability updates","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:37Z","receivedAt":"2009-05-18T23:44:37Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"I got a clue from Alex Riesen's \"Use UTF-8 instead of utf8 for backward\ncompatibility\" commit 39d404d1 that some of the iconv issues on Solaris\nand IRIX could be caused by character code naming issues.  It seems that\nthese platforms do not understand all of the alternate names that modern\nplatforms do.\n\nCharacter encodings are not a strong point of mine, so do comment if you\nsee something wrong.\n\nIn particular, notice 4/8 that changes the default fallback encoding to\nISO8859-1 instead of latin1.  My understanding is that these two are\nequivalent.\n\nWith this series applied, Solaris 10 must skip only 4 tests for me (plus two\nmore if I use Korn shell).  The remaining ones that are skipped have to do\nwith iconv but the character code conversions being tested are not installed.\n\nSolaris 7 must skip 30 (32 with Korn shell), down from 52 (54), and IRIX 6.5\nmust skip only 13, down from 44.\n\n-brandon\n\n\nBrandon Casey (8):\n  t3900: use ancient iconv names for backward compatibility\n  Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility\n  builtin-mailinfo.c: compare character encodings case insensitively\n  builtin-mailinfo.c: use \"ISO8859-1\" instead of \"latin1\" as fallback\n    encoding\n  t3901: avoid negation on right hand side of '|'\n  t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility\n  t9301: use ISO8859-1 rather than ISO-8859-1\n  t5100: use ancient encoding syntax for backwards compatibility\n\n builtin-log.c                             |    2 +-\n builtin-mailinfo.c                        |   10 +++----\n builtin-revert.c                          |    4 +-\n pretty.c                                  |    4 +-\n t/t3900-i18n-commit.sh                    |   28 ++++++++++----------\n t/t3900/{ISO-8859-1.txt => ISO8859-1.txt} |    0\n t/t3900/{EUCJP.txt => eucJP.txt}          |    0\n t/t3901-i18n-patch.sh                     |   40 ++++++++++++++--------------\n t/t5100/rfc2047-samples.mbox              |   32 +++++++++++-----------\n t/t5100/sample.mbox                       |    8 +++---\n t/t9129-git-svn-i18n-commitencoding.sh    |   10 +++---\n t/t9301-fast-export.sh                    |    2 +-\n t/t9500-gitweb-standalone-no-errors.sh    |    2 +-\n 13 files changed, 70 insertions(+), 72 deletions(-)\n rename t/t3900/{ISO-8859-1.txt => ISO8859-1.txt} (100%)\n rename t/t3900/{EUCJP.txt => eucJP.txt} (100%)\n"},{"id":"114209","messageId":"KfeKNR3Jm6YKvPIcYGBMpKjNOsMcmMNMJ1vr-EBr-eE371H-Rg69NOM1rMB2Oa5nCGVe2SMGKdc@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpCbbOxxIaBRphS4qzgN2W9mXIvp7Hl8SgBQzbAhZRV4A4Q6X14JTLR4@cipher.nrlssc.navy.mil","subject":"[PATCH 1/8] t3900: use ancient iconv names for backward compatibility","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:38Z","receivedAt":"2009-05-18T23:44:38Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some old iconv implementations do not have many alternate names and/or\ndo not match character encoding names case insensitively.  These\nimplementations can not tell that utf-8 and UTF-8 are the same encoding\nand fail when trying to do the conversion.  So use the old names, which\nmodern implementations still support.\n\nThe following conversions were performed:\n\n         utf-8 --> UTF-8\n    ISO-8859-1 --> ISO8859-1\n         EUCJP --> eucJP\n\nAlso update t9129 and t9500 which make use of the test files in t/t3900.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t3900-i18n-commit.sh                    |   28 ++++++++++++++--------------\n t/t3900/{ISO-8859-1.txt => ISO8859-1.txt} |    0\n t/t3900/{EUCJP.txt => eucJP.txt}          |    0\n t/t9129-git-svn-i18n-commitencoding.sh    |   10 +++++-----\n t/t9500-gitweb-standalone-no-errors.sh    |    2 +-\n 5 files changed, 20 insertions(+), 20 deletions(-)\n rename t/t3900/{ISO-8859-1.txt => ISO8859-1.txt} (100%)\n rename t/t3900/{EUCJP.txt => eucJP.txt} (100%)\n\ndiff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh\nindex b4ec2b5..256c4c9 100755\n--- a/t/t3900-i18n-commit.sh\n+++ b/t/t3900-i18n-commit.sh\n@@ -34,7 +34,7 @@ test_expect_success 'no encoding header for base case' '\n \ttest z = \"z$E\"\n '\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H setup\" '\n \t\tgit config i18n.commitencoding $H &&\n@@ -44,7 +44,7 @@ do\n \t'\n done\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"check encoding header for $H\" '\n \t\tE=$(git cat-file commit '$H' | sed -ne \"s/^encoding //p\") &&\n@@ -61,14 +61,14 @@ test_expect_success 'config to remove customization' '\n \telse\n \t\ttest z = \"z$Z\"\n \tfi &&\n-\tgit config i18n.commitencoding utf-8\n+\tgit config i18n.commitencoding UTF-8\n '\n \n-test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' '\n-\tcompare_with ISO-8859-1 \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt\n+test_expect_success 'ISO8859-1 should be shown in UTF-8 now' '\n+\tcompare_with ISO8859-1 \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt\n '\n \n-for H in EUCJP ISO-2022-JP\n+for H in eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H should be shown in UTF-8 now\" '\n \t\tcompare_with '$H' \"$TEST_DIRECTORY\"/t3900/2-UTF-8.txt\n@@ -86,7 +86,7 @@ test_expect_success 'config to add customization' '\n \tfi\n '\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H should be shown in itself now\" '\n \t\tgit config i18n.commitencoding '$H' &&\n@@ -95,21 +95,21 @@ do\n done\n \n test_expect_success 'config to tweak customization' '\n-\tgit config i18n.logoutputencoding utf-8\n+\tgit config i18n.logoutputencoding UTF-8\n '\n \n-test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' '\n-\tcompare_with ISO-8859-1 \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt\n+test_expect_success 'ISO8859-1 should be shown in UTF-8 now' '\n+\tcompare_with ISO8859-1 \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt\n '\n \n-for H in EUCJP ISO-2022-JP\n+for H in eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H should be shown in UTF-8 now\" '\n \t\tcompare_with '$H' \"$TEST_DIRECTORY\"/t3900/2-UTF-8.txt\n \t'\n done\n \n-for J in EUCJP ISO-2022-JP\n+for J in eucJP ISO-2022-JP\n do\n \tif test \"$J\" = ISO-2022-JP\n \tthen\n@@ -118,7 +118,7 @@ do\n \t\tICONV=\n \tfi\n \tgit config i18n.logoutputencoding $J\n-\tfor H in EUCJP ISO-2022-JP\n+\tfor H in eucJP ISO-2022-JP\n \tdo\n \t\ttest_expect_success \"$H should be shown in $J now\" '\n \t\t\tcompare_with '$H' \"$TEST_DIRECTORY\"/t3900/'$J'.txt $ICONV\n@@ -126,7 +126,7 @@ do\n \tdone\n done\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"No conversion with $H\" '\n \t\tcompare_with \"--encoding=none '$H'\" \"$TEST_DIRECTORY\"/t3900/'$H'.txt\ndiff --git a/t/t3900/ISO-8859-1.txt b/t/t3900/ISO8859-1.txt\nsimilarity index 100%\nrename from t/t3900/ISO-8859-1.txt\nrename to t/t3900/ISO8859-1.txt\ndiff --git a/t/t3900/EUCJP.txt b/t/t3900/eucJP.txt\nsimilarity index 100%\nrename from t/t3900/EUCJP.txt\nrename to t/t3900/eucJP.txt\ndiff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh\nindex 3200ab3..6c6d033 100755\n--- a/t/t9129-git-svn-i18n-commitencoding.sh\n+++ b/t/t9129-git-svn-i18n-commitencoding.sh\n@@ -29,7 +29,7 @@ compare_svn_head_with () {\n \ttest_cmp current \"$1\"\n }\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H setup\" '\n \t\tmkdir $H &&\n@@ -38,7 +38,7 @@ do\n \t'\n done\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H commit on git side\" '\n \t(\n@@ -55,7 +55,7 @@ do\n \t'\n done\n \n-for H in ISO-8859-1 EUCJP ISO-2022-JP\n+for H in ISO8859-1 eucJP ISO-2022-JP\n do\n \ttest_expect_success \"$H dcommit to svn\" '\n \t(\n@@ -77,12 +77,12 @@ fi\n \n test_expect_success UTF8 'ISO-8859-1 should match UTF-8 in svn' '\n \t(\n-\t\tcd ISO-8859-1 &&\n+\t\tcd ISO8859-1 &&\n \t\tcompare_svn_head_with \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt\n \t)\n '\n \n-for H in EUCJP ISO-2022-JP\n+for H in eucJP ISO-2022-JP\n do\n \ttest_expect_success UTF8 \"$H should match UTF-8 in svn\" '\n \t\t(\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex f4210fb..d539619 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -590,7 +590,7 @@ test_expect_success \\\n \t echo \"ISO-8859-1\" >> file &&\n \t git add file &&\n \t git config i18n.commitencoding ISO-8859-1 &&\n-\t git commit -F \"$TEST_DIRECTORY\"/t3900/ISO-8859-1.txt &&\n+\t git commit -F \"$TEST_DIRECTORY\"/t3900/ISO8859-1.txt &&\n \t git config --unset i18n.commitencoding &&\n \t gitweb_run \"p=.git;a=commit\"'\n test_debug 'cat gitweb.log'\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114208","messageId":"KfeKNR3Jm6YKvPIcYGBMpLkRr97IFN82BZR2bJNHFQYwhjGgwGRoIAkKO5m1EZb7M9epcX8P-fk@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpKjNOsMcmMNMJ1vr-EBr-eE371H-Rg69NOM1rMB2Oa5nCGVe2SMGKdc@cipher.nrlssc.navy.mil","subject":"[PATCH 2/8] Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:39Z","receivedAt":"2009-05-18T23:44:39Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some ancient platforms (Solaris 7, IRIX 6.5) do not understand 'utf-8', but\nall tested implementations understand 'UTF-8'.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n builtin-log.c      |    2 +-\n builtin-mailinfo.c |    2 +-\n builtin-revert.c   |    4 ++--\n pretty.c           |    4 ++--\n 4 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 5eaec5d..58db959 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -619,7 +619,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,\n \tstruct shortlog log;\n \tstruct strbuf sb = STRBUF_INIT;\n \tint i;\n-\tconst char *encoding = \"utf-8\";\n+\tconst char *encoding = \"UTF-8\";\n \tstruct diff_options opts;\n \tint need_8bit_cte = 0;\n \tstruct commit *commit = NULL;\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex 1eeeb4d..5ebc8b5 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -944,7 +944,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)\n \t */\n \tgit_config(git_default_config, NULL);\n \n-\tdef_charset = (git_commit_encoding ? git_commit_encoding : \"utf-8\");\n+\tdef_charset = (git_commit_encoding ? git_commit_encoding : \"UTF-8\");\n \tmetainfo_charset = def_charset;\n \n \twhile (1 < argc && argv[1][0] == '-') {\ndiff --git a/builtin-revert.c b/builtin-revert.c\nindex 3f2614e..ae01395 100644\n--- a/builtin-revert.c\n+++ b/builtin-revert.c\n@@ -323,9 +323,9 @@ static int revert_or_cherry_pick(int argc, const char **argv)\n \n \tencoding = get_encoding(message);\n \tif (!encoding)\n-\t\tencoding = \"utf-8\";\n+\t\tencoding = \"UTF-8\";\n \tif (!git_commit_encoding)\n-\t\tgit_commit_encoding = \"utf-8\";\n+\t\tgit_commit_encoding = \"UTF-8\";\n \tif ((reencoded_message = reencode_string(message,\n \t\t\t\t\tgit_commit_encoding, encoding)))\n \t\tmessage = reencoded_message;\ndiff --git a/pretty.c b/pretty.c\nindex a0ef356..e5328da 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -284,7 +284,7 @@ static char *replace_encoding_header(char *buf, const char *encoding)\n static char *logmsg_reencode(const struct commit *commit,\n \t\t\t     const char *output_encoding)\n {\n-\tstatic const char *utf8 = \"utf-8\";\n+\tstatic const char *utf8 = \"UTF-8\";\n \tconst char *use_encoding;\n \tchar *encoding;\n \tchar *out;\n@@ -881,7 +881,7 @@ char *reencode_commit_message(const struct commit *commit, const char **encoding\n \t\t    ? git_log_output_encoding\n \t\t    : git_commit_encoding);\n \tif (!encoding)\n-\t\tencoding = \"utf-8\";\n+\t\tencoding = \"UTF-8\";\n \tif (encoding_p)\n \t\t*encoding_p = encoding;\n \treturn logmsg_reencode(commit, encoding);\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114207","messageId":"KfeKNR3Jm6YKvPIcYGBMpEj60b9ww0Dv2XSyNy2qLE-KEaaF8D8q9OHVC3tPAPSzNe1CJUXJDfA@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpLkRr97IFN82BZR2bJNHFQYwhjGgwGRoIAkKO5m1EZb7M9epcX8P-fk@cipher.nrlssc.navy.mil","subject":"[PATCH 3/8] builtin-mailinfo.c: compare character encodings case insensitively","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:40Z","receivedAt":"2009-05-18T23:44:40Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"When converting between character encodings, git tests whether the \"from\"\nencoding and the \"to\" encoding have the same name.  git should perform this\ntest case insensitively so that e.g. utf-8 is not seen as a different\nencoding than UTF-8.\n\nAdditionally, it is not necessary to call tolower() anymore on the encodings\nextracted from the mail message.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n builtin-mailinfo.c |    6 ++----\n 1 files changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex 5ebc8b5..c68187e 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -193,8 +193,7 @@ static void handle_content_type(struct strbuf *line)\n \t\t*content_top = boundary;\n \t\tboundary = NULL;\n \t}\n-\tif (slurp_attr(line->buf, \"charset=\", &charset))\n-\t\tstrbuf_tolower(&charset);\n+\tslurp_attr(line->buf, \"charset=\", &charset);\n \n \tif (boundary) {\n \t\tstrbuf_release(boundary);\n@@ -494,7 +493,7 @@ static void convert_to_utf8(struct strbuf *line, const char *charset)\n \t\t\treturn;\n \t}\n \n-\tif (!strcmp(metainfo_charset, charset))\n+\tif (!strcasecmp(metainfo_charset, charset))\n \t\treturn;\n \tout = reencode_string(line->buf, metainfo_charset, charset);\n \tif (!out)\n@@ -550,7 +549,6 @@ static int decode_header_bq(struct strbuf *it)\n \t\tif (cp + 3 - it->buf > it->len)\n \t\t\tgoto decode_header_bq_out;\n \t\tstrbuf_add(&charset_q, ep, cp - ep);\n-\t\tstrbuf_tolower(&charset_q);\n \n \t\tencoding = cp[1];\n \t\tif (!encoding || cp[2] != '?')\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114211","messageId":"KfeKNR3Jm6YKvPIcYGBMpGlk83sgTnCuuc7WdvYgBn_Ja9b0yZjdlJxTSSCaDWC05irzAQVk1uM@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpEj60b9ww0Dv2XSyNy2qLE-KEaaF8D8q9OHVC3tPAPSzNe1CJUXJDfA@cipher.nrlssc.navy.mil","subject":"[PATCH 4/8] builtin-mailinfo.c: use \"ISO8859-1\" instead of \"latin1\" as fallback encoding","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:41Z","receivedAt":"2009-05-18T23:44:41Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some platforms do not understand the character encoding \"latin1\" which is\nanother name for \"ISO8859-1\".  So use \"ISO8859-1\" instead which all tested\nplatforms understand.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n builtin-mailinfo.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex c68187e..92637ac 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -480,7 +480,7 @@ static const char *guess_charset(const struct strbuf *line, const char *target_c\n \t\tif (is_utf8(line->buf))\n \t\t\treturn NULL;\n \t}\n-\treturn \"latin1\";\n+\treturn \"ISO8859-1\";\n }\n \n static void convert_to_utf8(struct strbuf *line, const char *charset)\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114214","messageId":"KfeKNR3Jm6YKvPIcYGBMpPhpa6XnDlrUaNKPjrH6NYGZK9NzwH2STGreDnkCUEwiMxu0BD6uSgk@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpGlk83sgTnCuuc7WdvYgBn_Ja9b0yZjdlJxTSSCaDWC05irzAQVk1uM@cipher.nrlssc.navy.mil","subject":"[PATCH 5/8] t3901: avoid negation on right hand side of '|'","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:42Z","receivedAt":"2009-05-18T23:44:42Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some shells do not properly handle constructs of the form:\n\n   spew_something | ! process_input\n\nSo rewrite this to be:\n\n   spew_something | process_input; test $? != 0\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t3901-i18n-patch.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex 7655da3..b04f74a 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -19,7 +19,7 @@ check_encoding () {\n \t\t8859)\n \t\t\tgrep \"^encoding ISO-8859-1\" ;;\n \t\t*)\n-\t\t\t! grep \"^encoding ISO-8859-1\" ;;\n+\t\t\tgrep \"^encoding ISO-8859-1\"; test \"$?\" != 0 ;;\n \t\tesac || {\n \t\t\tbad=1\n \t\t\tbreak\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114212","messageId":"KfeKNR3Jm6YKvPIcYGBMpKMgDQvtEffFhDQ5lsZU861rwPvLMbXRKufUbP1Cj7yuYKrGcvxDsnU@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpPhpa6XnDlrUaNKPjrH6NYGZK9NzwH2STGreDnkCUEwiMxu0BD6uSgk@cipher.nrlssc.navy.mil","subject":"[PATCH 6/8] t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:43Z","receivedAt":"2009-05-18T23:44:43Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some ancient platforms do not have an extensive list of alternate names for\ncharacter encodings.  For example, Solaris 7 does not know that ISO-8859-1\nis the same as ISO8859-1.  Modern platforms do know this, so use the older\nname.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t3901-i18n-patch.sh |   40 ++++++++++++++++++++--------------------\n 1 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex b04f74a..31a5770 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -17,9 +17,9 @@ check_encoding () {\n \t\tgit cat-file commit HEAD~$j |\n \t\tcase \"$header\" in\n \t\t8859)\n-\t\t\tgrep \"^encoding ISO-8859-1\" ;;\n+\t\t\tgrep \"^encoding ISO8859-1\" ;;\n \t\t*)\n-\t\t\tgrep \"^encoding ISO-8859-1\"; test \"$?\" != 0 ;;\n+\t\t\tgrep \"^encoding ISO8859-1\"; test \"$?\" != 0 ;;\n \t\tesac || {\n \t\t\tbad=1\n \t\t\tbreak\n@@ -55,7 +55,7 @@ test_expect_success setup '\n \tgit commit -s -m \"Second on side\" &&\n \n \t# the second one on the side branch is ISO-8859-1\n-\tgit config i18n.commitencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n \t# use author and committer name in ISO-8859-1 to match it.\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \ttest_tick &&\n@@ -68,14 +68,14 @@ test_expect_success setup '\n '\n \n test_expect_success 'format-patch output (ISO-8859-1)' '\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \n \tgit format-patch --stdout master..HEAD^ >out-l1 &&\n \tgit format-patch --stdout HEAD^ >out-l2 &&\n-\tgrep \"^Content-Type: text/plain; charset=ISO-8859-1\" out-l1 &&\n-\tgrep \"^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l1 &&\n-\tgrep \"^Content-Type: text/plain; charset=ISO-8859-1\" out-l2 &&\n-\tgrep \"^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l2\n+\tgrep \"^Content-Type: text/plain; charset=ISO8859-1\" out-l1 &&\n+\tgrep \"^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l1 &&\n+\tgrep \"^Content-Type: text/plain; charset=ISO8859-1\" out-l2 &&\n+\tgrep \"^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=\" out-l2\n '\n \n test_expect_success 'format-patch output (UTF-8)' '\n@@ -110,7 +110,7 @@ test_expect_success 'rebase (U/U)' '\n \n test_expect_success 'rebase (U/L)' '\n \tgit config i18n.commitencoding UTF-8 &&\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901-utf8.txt &&\n \n \tgit reset --hard side &&\n@@ -121,8 +121,8 @@ test_expect_success 'rebase (U/L)' '\n \n test_expect_success 'rebase (L/L)' '\n \t# In this test we want ISO-8859-1 encoded commits as the result\n-\tgit config i18n.commitencoding ISO-8859-1 &&\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \n \tgit reset --hard side &&\n@@ -134,7 +134,7 @@ test_expect_success 'rebase (L/L)' '\n test_expect_success 'rebase (L/U)' '\n \t# This is pathological -- use UTF-8 as intermediate form\n \t# to get ISO-8859-1 results.\n-\tgit config i18n.commitencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \n@@ -162,8 +162,8 @@ test_expect_success 'cherry-pick(U/U)' '\n test_expect_success 'cherry-pick(L/L)' '\n \t# Both the commitencoding and logoutputencoding is set to ISO-8859-1\n \n-\tgit config i18n.commitencoding ISO-8859-1 &&\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \n \tgit reset --hard master &&\n@@ -178,7 +178,7 @@ test_expect_success 'cherry-pick(U/L)' '\n \t# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1\n \n \tgit config i18n.commitencoding UTF-8 &&\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901-utf8.txt &&\n \n \tgit reset --hard master &&\n@@ -193,7 +193,7 @@ test_expect_success 'cherry-pick(L/U)' '\n \t# Again, the commitencoding is set to ISO-8859-1 but\n \t# logoutputencoding is set to UTF-8.\n \n-\tgit config i18n.commitencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \n@@ -218,7 +218,7 @@ test_expect_success 'rebase --merge (U/U)' '\n \n test_expect_success 'rebase --merge (U/L)' '\n \tgit config i18n.commitencoding UTF-8 &&\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901-utf8.txt &&\n \n \tgit reset --hard side &&\n@@ -229,8 +229,8 @@ test_expect_success 'rebase --merge (U/L)' '\n \n test_expect_success 'rebase --merge (L/L)' '\n \t# In this test we want ISO-8859-1 encoded commits as the result\n-\tgit config i18n.commitencoding ISO-8859-1 &&\n-\tgit config i18n.logoutputencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n+\tgit config i18n.logoutputencoding ISO8859-1 &&\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \n \tgit reset --hard side &&\n@@ -242,7 +242,7 @@ test_expect_success 'rebase --merge (L/L)' '\n test_expect_success 'rebase --merge (L/U)' '\n \t# This is pathological -- use UTF-8 as intermediate form\n \t# to get ISO-8859-1 results.\n-\tgit config i18n.commitencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n \tgit config i18n.logoutputencoding UTF-8 &&\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \n-- \n1.6.3.1.24.g152f4\n"},{"id":"114213","messageId":"KfeKNR3Jm6YKvPIcYGBMpD_AmxNUeXbQUOa7RCzy3RyTmaiqpcJHJcp9eR8w363qcg0oZzieLd0@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpKMgDQvtEffFhDQ5lsZU861rwPvLMbXRKufUbP1Cj7yuYKrGcvxDsnU@cipher.nrlssc.navy.mil","subject":"[PATCH 7/8] t9301: use ISO8859-1 rather than ISO-8859-1","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:44Z","receivedAt":"2009-05-18T23:44:44Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some ancient platforms do not have an extensive list of alternate names for\ncharacter encodings.  For example, Solaris 7 does not know that ISO-8859-1\nis the same as ISO8859-1.  Modern platforms do know this, so use the older\nname.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n\n\nFeel free to squash.\n\n\n t/t9301-fast-export.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh\nindex 8da9ce5..8c8a9e6 100755\n--- a/t/t9301-fast-export.sh\n+++ b/t/t9301-fast-export.sh\n@@ -68,7 +68,7 @@ test_expect_success 'fast-export master~2..master' '\n \n test_expect_success 'iso-8859-1' '\n \n-\tgit config i18n.commitencoding ISO-8859-1 &&\n+\tgit config i18n.commitencoding ISO8859-1 &&\n \t# use author and committer name in ISO-8859-1 to match it.\n \t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n \ttest_tick &&\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114215","messageId":"KfeKNR3Jm6YKvPIcYGBMpDtcOdL_JQMWwSHWkmiNf_gpkqZ0z2Gj3DhR4xNob0vpb5MbKv1cOns@cipher.nrlssc.navy.mil","threadId":"19409","inReplyTo":"KfeKNR3Jm6YKvPIcYGBMpD_AmxNUeXbQUOa7RCzy3RyTmaiqpcJHJcp9eR8w363qcg0oZzieLd0@cipher.nrlssc.navy.mil","subject":"[PATCH 8/8] t5100: use ancient encoding syntax for backwards compatibility","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-18T23:44:45Z","receivedAt":"2009-05-18T23:44:45Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some ancient platforms do not have an extensive list of alternate names for\ncharacter encodings.  For example, Solaris 7 does not know that ISO-8859-1\nis the same as ISO8859-1.  Modern platforms do know this, so use the older\nnames.\n\nThe following conversions were performed:\n\n    ISO-8859-1 --> ISO8859-1\n    ISO-8859-2 --> ISO8859-2\n    ISO-8859-8 --> ISO8859-8\n    iso-2022-jp --> ISO-2022-JP\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t5100/rfc2047-samples.mbox |   32 ++++++++++++++++----------------\n t/t5100/sample.mbox          |    8 ++++----\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t5100/rfc2047-samples.mbox b/t/t5100/rfc2047-samples.mbox\nindex 3ca2470..1fc2248 100644\n--- a/t/t5100/rfc2047-samples.mbox\n+++ b/t/t5100/rfc2047-samples.mbox\n@@ -1,48 +1,48 @@\n From nobody Mon Sep 17 00:00:00 2001\n From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>\n-To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>\n-CC: =?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>\n-Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=\n- =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=\n+To: =?ISO8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>\n+CC: =?ISO8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>\n+Subject: =?ISO8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=\n+ =?ISO8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=\n \n From nobody Mon Sep 17 00:00:00 2001\n-From: =?ISO-8859-1?Q?Olle_J=E4rnefors?= <ojarnef@admin.kth.se>\n+From: =?ISO8859-1?Q?Olle_J=E4rnefors?= <ojarnef@admin.kth.se>\n To: ietf-822@dimacs.rutgers.edu, ojarnef@admin.kth.se\n Subject: Time for ISO 10646?\n \n From nobody Mon Sep 17 00:00:00 2001\n To: Dave Crocker <dcrocker@mordor.stanford.edu>\n Cc: ietf-822@dimacs.rutgers.edu, paf@comsol.se\n-From: =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@nada.kth.se>\n+From: =?ISO8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@nada.kth.se>\n Subject: Re: RFC-HDR care and feeding\n \n From nobody Mon Sep 17 00:00:00 2001\n From: Nathaniel Borenstein <nsb@thumper.bellcore.com>\n-      (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)\n+      (=?ISO8859-8?b?7eXs+SDv4SDp7Oj08A==?=)\n To: Greg Vaudreuil <gvaudre@NRI.Reston.VA.US>, Ned Freed\n    <ned@innosoft.com>, Keith Moore <moore@cs.utk.edu>\n Subject: Test of new header generator\n MIME-Version: 1.0\n-Content-type: text/plain; charset=ISO-8859-1\n+Content-type: text/plain; charset=ISO8859-1\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a?=)\n+Subject: (=?ISO8859-1?Q?a?=)\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a?= b)\n+Subject: (=?ISO8859-1?Q?a?= b)\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)\n+Subject: (=?ISO8859-1?Q?a?= =?ISO8859-1?Q?b?=)\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)\n+Subject: (=?ISO8859-1?Q?a?=  =?ISO8859-1?Q?b?=)\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a?=\n-    =?ISO-8859-1?Q?b?=)\n+Subject: (=?ISO8859-1?Q?a?=\n+    =?ISO8859-1?Q?b?=)\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a_b?=)\n+Subject: (=?ISO8859-1?Q?a_b?=)\n \n From nobody Mon Sep 17 00:00:00 2001\n-Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)\n+Subject: (=?ISO8859-1?Q?a?= =?ISO8859-2?Q?_b?=)\ndiff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox\nindex c5ad206..c3074ac 100644\n--- a/t/t5100/sample.mbox\n+++ b/t/t5100/sample.mbox\n@@ -99,7 +99,7 @@ index 9123cdc..918dcf8 100644\n From nobody Sat Aug 27 23:07:49 2005\n Path: news.gmane.org!not-for-mail\n Message-ID: <20050721.091036.01119516.yoshfuji@linux-ipv6.org>\n-From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= \n+From: YOSHIFUJI Hideaki / =?ISO-2022-JP?B?GyRCNUhGIzFRTEAbKEI=?= \n \t<yoshfuji@linux-ipv6.org>\n Newsgroups: gmane.comp.version-control.git\n Subject: [PATCH 1/2] GIT: Try all addresses for given remote name\n@@ -218,7 +218,7 @@ GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA\n From nobody Sat Aug 27 23:07:49 2005\n Path: news.gmane.org!not-for-mail\n Message-ID: <u5tacjjdpxq.fsf@lysator.liu.se>\n-From: =?iso-8859-1?Q?David_K=E5gedal?= <davidk@lysator.liu.se>\n+From: =?ISO8859-1?Q?David_K=E5gedal?= <davidk@lysator.liu.se>\n Newsgroups: gmane.comp.version-control.git\n Subject: [PATCH] Fixed two bugs in git-cvsimport-script.\n Date: Mon, 15 Aug 2005 20:18:25 +0200\n@@ -226,7 +226,7 @@ Lines: 83\n Approved: news@gmane.org\n NNTP-Posting-Host: main.gmane.org\n Mime-Version: 1.0\n-Content-Type: text/plain; charset=iso-8859-1\n+Content-Type: text/plain; charset=ISO8859-1\n Content-Transfer-Encoding: QUOTED-PRINTABLE\n X-Trace: sea.gmane.org 1124130247 31839 80.91.229.2 (15 Aug 2005 18:24:07 GMT)\n X-Complaints-To: usenet@sea.gmane.org\n@@ -476,7 +476,7 @@ MIME-Version: 1.0\n Content-Type: multipart/mixed; boundary=\"=-=-=\"\n \n --=-=-=\n-Content-Type: text/plain; charset=iso-8859-15\n+Content-Type: text/plain; charset=ISO8859-15\n Content-Transfer-Encoding: quoted-printable\n \n Here comes a commit log message, and\n-- \n1.6.3.1.24.g152f4\n"}]}