From: Johannes Sixt <j...@kdbg.org>

iconv on Windows does not know the encoding name "utf8", and does not
re-encode log messages when this name is given. Request "UTF-8" encoding.

Signed-off-by: Johannes Sixt <j...@kdbg.org>
---
 I'm not sure whether I'm right to say that "UTF-8" is the correct
 spelling. Anyway, 'iconv -l' on my old Linux box lists "UTF8", but on
 Windows it does not.

 A more correct fix would probably be to use is_encoding_utf8() in more
 places, but it's outside my time budget look after it.

 -- Hannes

 t/t4210-log-i18n.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh
index 52a7472..b1956e2 100755
--- a/t/t4210-log-i18n.sh
+++ b/t/t4210-log-i18n.sh
@@ -15,7 +15,7 @@ test_expect_success 'create commits in different encodings' '
        t${utf8_e}st
        EOF
        git add msg &&
-       git -c i18n.commitencoding=utf8 commit -F msg &&
+       git -c i18n.commitencoding=UTF-8 commit -F msg &&
        cat >msg <<-EOF &&
        latin1
 
@@ -30,7 +30,7 @@ test_expect_success 'log --grep searches in log output 
encoding (utf8)' '
        latin1
        utf8
        EOF
-       git log --encoding=utf8 --format=%s --grep=$utf8_e >actual &&
+       git log --encoding=UTF-8 --format=%s --grep=$utf8_e >actual &&
        test_cmp expect actual
 '
 
@@ -45,7 +45,7 @@ test_expect_success 'log --grep searches in log output 
encoding (latin1)' '
 
 test_expect_success 'log --grep does not find non-reencoded values (utf8)' '
        >expect &&
-       git log --encoding=utf8 --format=%s --grep=$latin1_e >actual &&
+       git log --encoding=UTF-8 --format=%s --grep=$latin1_e >actual &&
        test_cmp expect actual
 '
 
-- 
"Atomic objects are neither active nor radioactive." --
Programming Languages -- C++, Final Committee Draft (Doc.N3092)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to