From 5ae93dfdccfe9457bdb1f54b33c76359f6c3b861 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:38 -0500 Subject: t3900: use ancient iconv names for backward compatibility Some old iconv implementations do not have many alternate names and/or do not match character encoding names case insensitively. These implementations can not tell that utf-8 and UTF-8 are the same encoding and fail when trying to do the conversion. So use the old names, which modern implementations still support. The following conversions were performed: utf-8 --> UTF-8 ISO-8859-1 --> ISO8859-1 EUCJP --> eucJP Also update t9129 and t9500 which make use of the test files in t/t3900. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t3900-i18n-commit.sh | 28 ++++++++++++++-------------- t/t3900/EUCJP.txt | 4 ---- t/t3900/ISO-8859-1.txt | 3 --- t/t3900/ISO8859-1.txt | 3 +++ t/t3900/eucJP.txt | 4 ++++ t/t9129-git-svn-i18n-commitencoding.sh | 10 +++++----- t/t9500-gitweb-standalone-no-errors.sh | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 t/t3900/EUCJP.txt delete mode 100644 t/t3900/ISO-8859-1.txt create mode 100644 t/t3900/ISO8859-1.txt create mode 100644 t/t3900/eucJP.txt diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh index b4ec2b53d..256c4c970 100755 --- a/t/t3900-i18n-commit.sh +++ b/t/t3900-i18n-commit.sh @@ -34,7 +34,7 @@ test_expect_success 'no encoding header for base case' ' test z = "z$E" ' -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "$H setup" ' git config i18n.commitencoding $H && @@ -44,7 +44,7 @@ do ' done -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "check encoding header for $H" ' E=$(git cat-file commit '$H' | sed -ne "s/^encoding //p") && @@ -61,14 +61,14 @@ test_expect_success 'config to remove customization' ' else test z = "z$Z" fi && - git config i18n.commitencoding utf-8 + git config i18n.commitencoding UTF-8 ' -test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' ' - compare_with ISO-8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt +test_expect_success 'ISO8859-1 should be shown in UTF-8 now' ' + compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt ' -for H in EUCJP ISO-2022-JP +for H in eucJP ISO-2022-JP do test_expect_success "$H should be shown in UTF-8 now" ' compare_with '$H' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt @@ -86,7 +86,7 @@ test_expect_success 'config to add customization' ' fi ' -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "$H should be shown in itself now" ' git config i18n.commitencoding '$H' && @@ -95,21 +95,21 @@ do done test_expect_success 'config to tweak customization' ' - git config i18n.logoutputencoding utf-8 + git config i18n.logoutputencoding UTF-8 ' -test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' ' - compare_with ISO-8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt +test_expect_success 'ISO8859-1 should be shown in UTF-8 now' ' + compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt ' -for H in EUCJP ISO-2022-JP +for H in eucJP ISO-2022-JP do test_expect_success "$H should be shown in UTF-8 now" ' compare_with '$H' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt ' done -for J in EUCJP ISO-2022-JP +for J in eucJP ISO-2022-JP do if test "$J" = ISO-2022-JP then @@ -118,7 +118,7 @@ do ICONV= fi git config i18n.logoutputencoding $J - for H in EUCJP ISO-2022-JP + for H in eucJP ISO-2022-JP do test_expect_success "$H should be shown in $J now" ' compare_with '$H' "$TEST_DIRECTORY"/t3900/'$J'.txt $ICONV @@ -126,7 +126,7 @@ do done done -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "No conversion with $H" ' compare_with "--encoding=none '$H'" "$TEST_DIRECTORY"/t3900/'$H'.txt diff --git a/t/t3900/EUCJP.txt b/t/t3900/EUCJP.txt deleted file mode 100644 index 546f2aac0..000000000 --- a/t/t3900/EUCJP.txt +++ /dev/null @@ -1,4 +0,0 @@ -¤Ï¤ì¤Ò¤Û¤Õ - -¤·¤Æ¤¤¤ë¤Î¤¬¡¢¤¤¤ë¤Î¤Ç¡£ -ßÀÉͤۤì¤×¤ê¤Ý¤ì¤Þ¤Ó¤°¤ê¤í¤Ø¡£ diff --git a/t/t3900/ISO-8859-1.txt b/t/t3900/ISO-8859-1.txt deleted file mode 100644 index 7cbef0ee6..000000000 --- a/t/t3900/ISO-8859-1.txt +++ /dev/null @@ -1,3 +0,0 @@ -ÄËÑÏÖ - -Ábçdèfg diff --git a/t/t3900/ISO8859-1.txt b/t/t3900/ISO8859-1.txt new file mode 100644 index 000000000..7cbef0ee6 --- /dev/null +++ b/t/t3900/ISO8859-1.txt @@ -0,0 +1,3 @@ +ÄËÑÏÖ + +Ábçdèfg diff --git a/t/t3900/eucJP.txt b/t/t3900/eucJP.txt new file mode 100644 index 000000000..546f2aac0 --- /dev/null +++ b/t/t3900/eucJP.txt @@ -0,0 +1,4 @@ +¤Ï¤ì¤Ò¤Û¤Õ + +¤·¤Æ¤¤¤ë¤Î¤¬¡¢¤¤¤ë¤Î¤Ç¡£ +ßÀÉͤۤì¤×¤ê¤Ý¤ì¤Þ¤Ó¤°¤ê¤í¤Ø¡£ diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh index 3200ab38e..6c6d03380 100755 --- a/t/t9129-git-svn-i18n-commitencoding.sh +++ b/t/t9129-git-svn-i18n-commitencoding.sh @@ -29,7 +29,7 @@ compare_svn_head_with () { test_cmp current "$1" } -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "$H setup" ' mkdir $H && @@ -38,7 +38,7 @@ do ' done -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "$H commit on git side" ' ( @@ -55,7 +55,7 @@ do ' done -for H in ISO-8859-1 EUCJP ISO-2022-JP +for H in ISO8859-1 eucJP ISO-2022-JP do test_expect_success "$H dcommit to svn" ' ( @@ -77,12 +77,12 @@ fi test_expect_success UTF8 'ISO-8859-1 should match UTF-8 in svn' ' ( - cd ISO-8859-1 && + cd ISO8859-1 && compare_svn_head_with "$TEST_DIRECTORY"/t3900/1-UTF-8.txt ) ' -for H in EUCJP ISO-2022-JP +for H in eucJP ISO-2022-JP do test_expect_success UTF8 "$H should match UTF-8 in svn" ' ( diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh index f4210fbb0..d539619e8 100755 --- a/t/t9500-gitweb-standalone-no-errors.sh +++ b/t/t9500-gitweb-standalone-no-errors.sh @@ -590,7 +590,7 @@ test_expect_success \ echo "ISO-8859-1" >> file && git add file && git config i18n.commitencoding ISO-8859-1 && - git commit -F "$TEST_DIRECTORY"/t3900/ISO-8859-1.txt && + git commit -F "$TEST_DIRECTORY"/t3900/ISO8859-1.txt && git config --unset i18n.commitencoding && gitweb_run "p=.git;a=commit"' test_debug 'cat gitweb.log' -- cgit v1.2.1 From 330db18c0277dcfcf322bb61c688acfb5ddf3867 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:39 -0500 Subject: Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility Some ancient platforms (Solaris 7, IRIX 6.5) do not understand 'utf-8', but all tested implementations understand 'UTF-8'. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- builtin-log.c | 2 +- builtin-mailinfo.c | 2 +- builtin-revert.c | 4 ++-- pretty.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin-log.c b/builtin-log.c index 5eaec5d24..58db9592c 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -619,7 +619,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, struct shortlog log; struct strbuf sb = STRBUF_INIT; int i; - const char *encoding = "utf-8"; + const char *encoding = "UTF-8"; struct diff_options opts; int need_8bit_cte = 0; struct commit *commit = NULL; diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index 1eeeb4de6..5ebc8b53c 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -944,7 +944,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix) */ git_config(git_default_config, NULL); - def_charset = (git_commit_encoding ? git_commit_encoding : "utf-8"); + def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8"); metainfo_charset = def_charset; while (1 < argc && argv[1][0] == '-') { diff --git a/builtin-revert.c b/builtin-revert.c index 3f2614e1b..ae0139500 100644 --- a/builtin-revert.c +++ b/builtin-revert.c @@ -323,9 +323,9 @@ static int revert_or_cherry_pick(int argc, const char **argv) encoding = get_encoding(message); if (!encoding) - encoding = "utf-8"; + encoding = "UTF-8"; if (!git_commit_encoding) - git_commit_encoding = "utf-8"; + git_commit_encoding = "UTF-8"; if ((reencoded_message = reencode_string(message, git_commit_encoding, encoding))) message = reencoded_message; diff --git a/pretty.c b/pretty.c index a0ef35655..e5328dab5 100644 --- a/pretty.c +++ b/pretty.c @@ -284,7 +284,7 @@ static char *replace_encoding_header(char *buf, const char *encoding) static char *logmsg_reencode(const struct commit *commit, const char *output_encoding) { - static const char *utf8 = "utf-8"; + static const char *utf8 = "UTF-8"; const char *use_encoding; char *encoding; char *out; @@ -881,7 +881,7 @@ char *reencode_commit_message(const struct commit *commit, const char **encoding ? git_log_output_encoding : git_commit_encoding); if (!encoding) - encoding = "utf-8"; + encoding = "UTF-8"; if (encoding_p) *encoding_p = encoding; return logmsg_reencode(commit, encoding); -- cgit v1.2.1 From ed1e3985e445e4cb4558056f8a31c366f2bf2634 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:40 -0500 Subject: builtin-mailinfo.c: compare character encodings case insensitively When converting between character encodings, git tests whether the "from" encoding and the "to" encoding have the same name. git should perform this test case insensitively so that e.g. utf-8 is not seen as a different encoding than UTF-8. Additionally, it is not necessary to call tolower() anymore on the encodings extracted from the mail message. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- builtin-mailinfo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index 5ebc8b53c..c68187e2e 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -193,8 +193,7 @@ static void handle_content_type(struct strbuf *line) *content_top = boundary; boundary = NULL; } - if (slurp_attr(line->buf, "charset=", &charset)) - strbuf_tolower(&charset); + slurp_attr(line->buf, "charset=", &charset); if (boundary) { strbuf_release(boundary); @@ -494,7 +493,7 @@ static void convert_to_utf8(struct strbuf *line, const char *charset) return; } - if (!strcmp(metainfo_charset, charset)) + if (!strcasecmp(metainfo_charset, charset)) return; out = reencode_string(line->buf, metainfo_charset, charset); if (!out) @@ -550,7 +549,6 @@ static int decode_header_bq(struct strbuf *it) if (cp + 3 - it->buf > it->len) goto decode_header_bq_out; strbuf_add(&charset_q, ep, cp - ep); - strbuf_tolower(&charset_q); encoding = cp[1]; if (!encoding || cp[2] != '?') -- cgit v1.2.1 From 62645006044c7453439f6ad8dafc984441ac54b6 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:41 -0500 Subject: builtin-mailinfo.c: use "ISO8859-1" instead of "latin1" as fallback encoding Some platforms do not understand the character encoding "latin1" which is another name for "ISO8859-1". So use "ISO8859-1" instead which all tested platforms understand. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- builtin-mailinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index c68187e2e..92637ac0b 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -480,7 +480,7 @@ static const char *guess_charset(const struct strbuf *line, const char *target_c if (is_utf8(line->buf)) return NULL; } - return "latin1"; + return "ISO8859-1"; } static void convert_to_utf8(struct strbuf *line, const char *charset) -- cgit v1.2.1 From d4ea4e27463576f33866b1c3f0fe41913fb03ef7 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:42 -0500 Subject: t3901: avoid negation on right hand side of '|' Some shells do not properly handle constructs of the form: spew_something | ! process_input So rewrite this to be: spew_something | process_input; test $? != 0 Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t3901-i18n-patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh index 7655da3f8..b04f74aa7 100755 --- a/t/t3901-i18n-patch.sh +++ b/t/t3901-i18n-patch.sh @@ -19,7 +19,7 @@ check_encoding () { 8859) grep "^encoding ISO-8859-1" ;; *) - ! grep "^encoding ISO-8859-1" ;; + grep "^encoding ISO-8859-1"; test "$?" != 0 ;; esac || { bad=1 break -- cgit v1.2.1 From 1e6bca0e8941f3a73d16d1842e2202f85b446c41 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:43 -0500 Subject: t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility Some ancient platforms do not have an extensive list of alternate names for character encodings. For example, Solaris 7 does not know that ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use the older name. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t3901-i18n-patch.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh index b04f74aa7..31a5770b3 100755 --- a/t/t3901-i18n-patch.sh +++ b/t/t3901-i18n-patch.sh @@ -17,9 +17,9 @@ check_encoding () { git cat-file commit HEAD~$j | case "$header" in 8859) - grep "^encoding ISO-8859-1" ;; + grep "^encoding ISO8859-1" ;; *) - grep "^encoding ISO-8859-1"; test "$?" != 0 ;; + grep "^encoding ISO8859-1"; test "$?" != 0 ;; esac || { bad=1 break @@ -55,7 +55,7 @@ test_expect_success setup ' git commit -s -m "Second on side" && # the second one on the side branch is ISO-8859-1 - git config i18n.commitencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && # use author and committer name in ISO-8859-1 to match it. . "$TEST_DIRECTORY"/t3901-8859-1.txt && test_tick && @@ -68,14 +68,14 @@ test_expect_success setup ' ' test_expect_success 'format-patch output (ISO-8859-1)' ' - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.logoutputencoding ISO8859-1 && git format-patch --stdout master..HEAD^ >out-l1 && git format-patch --stdout HEAD^ >out-l2 && - grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l1 && - grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 && - grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l2 && - grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2 + grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 && + grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 && + grep "^Content-Type: text/plain; charset=ISO8859-1" out-l2 && + grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2 ' test_expect_success 'format-patch output (UTF-8)' ' @@ -110,7 +110,7 @@ test_expect_success 'rebase (U/U)' ' test_expect_success 'rebase (U/L)' ' git config i18n.commitencoding UTF-8 && - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.logoutputencoding ISO8859-1 && . "$TEST_DIRECTORY"/t3901-utf8.txt && git reset --hard side && @@ -121,8 +121,8 @@ test_expect_success 'rebase (U/L)' ' test_expect_success 'rebase (L/L)' ' # In this test we want ISO-8859-1 encoded commits as the result - git config i18n.commitencoding ISO-8859-1 && - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && + git config i18n.logoutputencoding ISO8859-1 && . "$TEST_DIRECTORY"/t3901-8859-1.txt && git reset --hard side && @@ -134,7 +134,7 @@ test_expect_success 'rebase (L/L)' ' test_expect_success 'rebase (L/U)' ' # This is pathological -- use UTF-8 as intermediate form # to get ISO-8859-1 results. - git config i18n.commitencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && git config i18n.logoutputencoding UTF-8 && . "$TEST_DIRECTORY"/t3901-8859-1.txt && @@ -162,8 +162,8 @@ test_expect_success 'cherry-pick(U/U)' ' test_expect_success 'cherry-pick(L/L)' ' # Both the commitencoding and logoutputencoding is set to ISO-8859-1 - git config i18n.commitencoding ISO-8859-1 && - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && + git config i18n.logoutputencoding ISO8859-1 && . "$TEST_DIRECTORY"/t3901-8859-1.txt && git reset --hard master && @@ -178,7 +178,7 @@ test_expect_success 'cherry-pick(U/L)' ' # Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1 git config i18n.commitencoding UTF-8 && - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.logoutputencoding ISO8859-1 && . "$TEST_DIRECTORY"/t3901-utf8.txt && git reset --hard master && @@ -193,7 +193,7 @@ test_expect_success 'cherry-pick(L/U)' ' # Again, the commitencoding is set to ISO-8859-1 but # logoutputencoding is set to UTF-8. - git config i18n.commitencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && git config i18n.logoutputencoding UTF-8 && . "$TEST_DIRECTORY"/t3901-8859-1.txt && @@ -218,7 +218,7 @@ test_expect_success 'rebase --merge (U/U)' ' test_expect_success 'rebase --merge (U/L)' ' git config i18n.commitencoding UTF-8 && - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.logoutputencoding ISO8859-1 && . "$TEST_DIRECTORY"/t3901-utf8.txt && git reset --hard side && @@ -229,8 +229,8 @@ test_expect_success 'rebase --merge (U/L)' ' test_expect_success 'rebase --merge (L/L)' ' # In this test we want ISO-8859-1 encoded commits as the result - git config i18n.commitencoding ISO-8859-1 && - git config i18n.logoutputencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && + git config i18n.logoutputencoding ISO8859-1 && . "$TEST_DIRECTORY"/t3901-8859-1.txt && git reset --hard side && @@ -242,7 +242,7 @@ test_expect_success 'rebase --merge (L/L)' ' test_expect_success 'rebase --merge (L/U)' ' # This is pathological -- use UTF-8 as intermediate form # to get ISO-8859-1 results. - git config i18n.commitencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && git config i18n.logoutputencoding UTF-8 && . "$TEST_DIRECTORY"/t3901-8859-1.txt && -- cgit v1.2.1 From e0d44c50752644fca80f1e78ab7a939135b380e1 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:44 -0500 Subject: t9301: use ISO8859-1 rather than ISO-8859-1 Some ancient platforms do not have an extensive list of alternate names for character encodings. For example, Solaris 7 does not know that ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use the older name. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t9301-fast-export.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh index 8da9ce545..8c8a9e63c 100755 --- a/t/t9301-fast-export.sh +++ b/t/t9301-fast-export.sh @@ -68,7 +68,7 @@ test_expect_success 'fast-export master~2..master' ' test_expect_success 'iso-8859-1' ' - git config i18n.commitencoding ISO-8859-1 && + git config i18n.commitencoding ISO8859-1 && # use author and committer name in ISO-8859-1 to match it. . "$TEST_DIRECTORY"/t3901-8859-1.txt && test_tick && -- cgit v1.2.1 From bf1db7dba50205905cb27ff73586ae3a44b89bca Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Mon, 18 May 2009 18:44:45 -0500 Subject: t5100: use ancient encoding syntax for backwards compatibility Some ancient platforms do not have an extensive list of alternate names for character encodings. For example, Solaris 7 does not know that ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use the older names. The following conversions were performed: ISO-8859-1 --> ISO8859-1 ISO-8859-2 --> ISO8859-2 ISO-8859-8 --> ISO8859-8 iso-2022-jp --> ISO-2022-JP Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t5100/rfc2047-samples.mbox | 32 ++++++++++++++++---------------- t/t5100/sample.mbox | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/t/t5100/rfc2047-samples.mbox b/t/t5100/rfc2047-samples.mbox index 3ca2470da..1fc224810 100644 --- a/t/t5100/rfc2047-samples.mbox +++ b/t/t5100/rfc2047-samples.mbox @@ -1,48 +1,48 @@ From nobody Mon Sep 17 00:00:00 2001 From: =?US-ASCII?Q?Keith_Moore?= -To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= -CC: =?ISO-8859-1?Q?Andr=E9?= Pirard -Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= - =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= +To: =?ISO8859-1?Q?Keld_J=F8rn_Simonsen?= +CC: =?ISO8859-1?Q?Andr=E9?= Pirard +Subject: =?ISO8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= + =?ISO8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= From nobody Mon Sep 17 00:00:00 2001 -From: =?ISO-8859-1?Q?Olle_J=E4rnefors?= +From: =?ISO8859-1?Q?Olle_J=E4rnefors?= To: ietf-822@dimacs.rutgers.edu, ojarnef@admin.kth.se Subject: Time for ISO 10646? From nobody Mon Sep 17 00:00:00 2001 To: Dave Crocker Cc: ietf-822@dimacs.rutgers.edu, paf@comsol.se -From: =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= +From: =?ISO8859-1?Q?Patrik_F=E4ltstr=F6m?= Subject: Re: RFC-HDR care and feeding From nobody Mon Sep 17 00:00:00 2001 From: Nathaniel Borenstein - (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=) + (=?ISO8859-8?b?7eXs+SDv4SDp7Oj08A==?=) To: Greg Vaudreuil , Ned Freed , Keith Moore Subject: Test of new header generator MIME-Version: 1.0 -Content-type: text/plain; charset=ISO-8859-1 +Content-type: text/plain; charset=ISO8859-1 From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a?=) +Subject: (=?ISO8859-1?Q?a?=) From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a?= b) +Subject: (=?ISO8859-1?Q?a?= b) From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=) +Subject: (=?ISO8859-1?Q?a?= =?ISO8859-1?Q?b?=) From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=) +Subject: (=?ISO8859-1?Q?a?= =?ISO8859-1?Q?b?=) From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a?= - =?ISO-8859-1?Q?b?=) +Subject: (=?ISO8859-1?Q?a?= + =?ISO8859-1?Q?b?=) From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a_b?=) +Subject: (=?ISO8859-1?Q?a_b?=) From nobody Mon Sep 17 00:00:00 2001 -Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=) +Subject: (=?ISO8859-1?Q?a?= =?ISO8859-2?Q?_b?=) diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox index c5ad206b4..c3074ac57 100644 --- a/t/t5100/sample.mbox +++ b/t/t5100/sample.mbox @@ -99,7 +99,7 @@ index 9123cdc..918dcf8 100644 From nobody Sat Aug 27 23:07:49 2005 Path: news.gmane.org!not-for-mail Message-ID: <20050721.091036.01119516.yoshfuji@linux-ipv6.org> -From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= +From: YOSHIFUJI Hideaki / =?ISO-2022-JP?B?GyRCNUhGIzFRTEAbKEI=?= Newsgroups: gmane.comp.version-control.git Subject: [PATCH 1/2] GIT: Try all addresses for given remote name @@ -218,7 +218,7 @@ GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From nobody Sat Aug 27 23:07:49 2005 Path: news.gmane.org!not-for-mail Message-ID: -From: =?iso-8859-1?Q?David_K=E5gedal?= +From: =?ISO8859-1?Q?David_K=E5gedal?= Newsgroups: gmane.comp.version-control.git Subject: [PATCH] Fixed two bugs in git-cvsimport-script. Date: Mon, 15 Aug 2005 20:18:25 +0200 @@ -226,7 +226,7 @@ Lines: 83 Approved: news@gmane.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 -Content-Type: text/plain; charset=iso-8859-1 +Content-Type: text/plain; charset=ISO8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: sea.gmane.org 1124130247 31839 80.91.229.2 (15 Aug 2005 18:24:07 GMT) X-Complaints-To: usenet@sea.gmane.org @@ -476,7 +476,7 @@ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= -Content-Type: text/plain; charset=iso-8859-15 +Content-Type: text/plain; charset=ISO8859-15 Content-Transfer-Encoding: quoted-printable Here comes a commit log message, and -- cgit v1.2.1 From bdb0a7e4e429860ce9dfe43401dda337dbbd0baa Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 22 May 2009 18:47:05 -0500 Subject: t8005: use more portable character encoding names Some platforms do not have an extensive list of alternate names for character encodings. Solaris 7 does not know about shift-jis, but does know SJIS. It also does not know that utf-8 and UTF-8 refer to the same encoding. With the above in mind, the following conversions were performed: utf-8 --> UTF-8 shift-jis --> SJIS Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t8005-blame-i18n.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh index fcd5c2667..75cbced22 100755 --- a/t/t8005-blame-i18n.sh +++ b/t/t8005-blame-i18n.sh @@ -20,7 +20,7 @@ test_expect_success 'setup the repository' ' echo "SJIS LINE" >> file && git add file && - git config i18n.commitencoding shift-jis && + git config i18n.commitencoding SJIS && git commit --author "$SJIS_NAME " -m "$SJIS_MSG" ' @@ -67,8 +67,8 @@ summary $UTF8_MSG EOF test_expect_success \ - 'blame respects --encoding=utf-8' ' - git blame --incremental --encoding=utf-8 file | \ + 'blame respects --encoding=UTF-8' ' + git blame --incremental --encoding=UTF-8 file | \ egrep "^(author|summary) " > actual && test_cmp actual expected ' -- cgit v1.2.1 From bb43414b371c663189f4ee32949d82303cac918c Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 22 May 2009 18:47:06 -0500 Subject: t8005: convert CP1251 character set to ISO8859-5 On IRIX 6.5 CP1251 is unknown, but WIN1251 (which seems to be a non-standard name) is known. On Solaris 10, the opposite is true. Solaris also knows CP1251 as WINDOWS-1251, but this too is not recognized on IRIX. I could not find a name that both platforms recognized for this character set. An alternative character set which covers the same alphabet seems to be the ISO8859-5 character set. Both platforms support this character set, so use it instead. This allows t8005.4 to pass on Solaris 7, and part of the test to pass on IRIX. (My IRIX can't convert SJIS to UTF-8 :( Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t8005-blame-i18n.sh | 26 +++++++++++++------------- t/t8005/cp1251.txt | 2 -- t/t8005/iso8859-5.txt | 2 ++ 3 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 t/t8005/cp1251.txt create mode 100644 t/t8005/iso8859-5.txt diff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh index 75cbced22..4460975c3 100755 --- a/t/t8005-blame-i18n.sh +++ b/t/t8005-blame-i18n.sh @@ -4,7 +4,7 @@ test_description='git blame encoding conversion' . ./test-lib.sh . "$TEST_DIRECTORY"/t8005/utf8.txt -. "$TEST_DIRECTORY"/t8005/cp1251.txt +. "$TEST_DIRECTORY"/t8005/iso8859-5.txt . "$TEST_DIRECTORY"/t8005/sjis.txt test_expect_success 'setup the repository' ' @@ -13,10 +13,10 @@ test_expect_success 'setup the repository' ' git add file && git commit --author "$UTF8_NAME " -m "$UTF8_MSG" && - echo "CP1251 LINE" >> file && + echo "KOI8-R LINE" >> file && git add file && - git config i18n.commitencoding cp1251 && - git commit --author "$CP1251_NAME " -m "$CP1251_MSG" && + git config i18n.commitencoding ISO8859-5 && + git commit --author "$ISO8859_5_NAME " -m "$ISO8859_5_MSG" && echo "SJIS LINE" >> file && git add file && @@ -41,17 +41,17 @@ test_expect_success \ ' cat >expected < actual && test_cmp actual expected @@ -76,8 +76,8 @@ test_expect_success \ cat >expected < Date: Wed, 27 May 2009 20:57:45 -0500 Subject: t8005: fix typo, it's ISO-8859-5, not KOI8-R Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t8005-blame-i18n.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh index 4460975c3..9cca14d08 100755 --- a/t/t8005-blame-i18n.sh +++ b/t/t8005-blame-i18n.sh @@ -13,7 +13,7 @@ test_expect_success 'setup the repository' ' git add file && git commit --author "$UTF8_NAME " -m "$UTF8_MSG" && - echo "KOI8-R LINE" >> file && + echo "ISO-8859-5 LINE" >> file && git add file && git config i18n.commitencoding ISO8859-5 && git commit --author "$ISO8859_5_NAME " -m "$ISO8859_5_MSG" && -- cgit v1.2.1