Skip to content

Commit bb43414

Browse files
drafnelgitster
authored andcommitted
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 <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bdb0a7e commit bb43414

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

t/t8005-blame-i18n.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_description='git blame encoding conversion'
44
. ./test-lib.sh
55

66
. "$TEST_DIRECTORY"/t8005/utf8.txt
7-
. "$TEST_DIRECTORY"/t8005/cp1251.txt
7+
. "$TEST_DIRECTORY"/t8005/iso8859-5.txt
88
. "$TEST_DIRECTORY"/t8005/sjis.txt
99

1010
test_expect_success 'setup the repository' '
@@ -13,10 +13,10 @@ test_expect_success 'setup the repository' '
1313
git add file &&
1414
git commit --author "$UTF8_NAME <utf8@localhost>" -m "$UTF8_MSG" &&
1515
16-
echo "CP1251 LINE" >> file &&
16+
echo "KOI8-R LINE" >> file &&
1717
git add file &&
18-
git config i18n.commitencoding cp1251 &&
19-
git commit --author "$CP1251_NAME <cp1251@localhost>" -m "$CP1251_MSG" &&
18+
git config i18n.commitencoding ISO8859-5 &&
19+
git commit --author "$ISO8859_5_NAME <iso8859-5@localhost>" -m "$ISO8859_5_MSG" &&
2020
2121
echo "SJIS LINE" >> file &&
2222
git add file &&
@@ -41,17 +41,17 @@ test_expect_success \
4141
'
4242

4343
cat >expected <<EOF
44-
author $CP1251_NAME
45-
summary $CP1251_MSG
46-
author $CP1251_NAME
47-
summary $CP1251_MSG
48-
author $CP1251_NAME
49-
summary $CP1251_MSG
44+
author $ISO8859_5_NAME
45+
summary $ISO8859_5_MSG
46+
author $ISO8859_5_NAME
47+
summary $ISO8859_5_MSG
48+
author $ISO8859_5_NAME
49+
summary $ISO8859_5_MSG
5050
EOF
5151

5252
test_expect_success \
5353
'blame respects i18n.logoutputencoding' '
54-
git config i18n.logoutputencoding cp1251 &&
54+
git config i18n.logoutputencoding ISO8859-5 &&
5555
git blame --incremental file | \
5656
egrep "^(author|summary) " > actual &&
5757
test_cmp actual expected
@@ -76,8 +76,8 @@ test_expect_success \
7676
cat >expected <<EOF
7777
author $SJIS_NAME
7878
summary $SJIS_MSG
79-
author $CP1251_NAME
80-
summary $CP1251_MSG
79+
author $ISO8859_5_NAME
80+
summary $ISO8859_5_MSG
8181
author $UTF8_NAME
8282
summary $UTF8_MSG
8383
EOF

t/t8005/cp1251.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

t/t8005/iso8859-5.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ISO8859_5_NAME="���� �������� �������"
2+
ISO8859_5_MSG="�������� ���������"

0 commit comments

Comments
 (0)