git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] Use UTF-8 instead of utf8 for backward compatibility
Date: Thu, 14 May 2009 15:05:55 +0200	[thread overview]
Message-ID: <81b0412b0905140605o21143369ibc3147c6619c7845@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

An old iconv (GNU libiconv 1.11) does not know about utf8, it does know
UTF-8 though, which is also understood by all newer iconv implementations.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

2009/5/12 Junio C Hamano <gitster@pobox.com>:
> --- a/t/t3900-i18n-commit.sh
> +++ b/t/t3900-i18n-commit.sh
> @@ -9,7 +9,15 @@ test_description='commit and log output encodings'
>
>  compare_with () {
>        git show -s $1 | sed -e '1,/^$/d' -e 's/^    //' >current &&
> -       test_cmp current "$2"
> +       case "$3" in
> +       '')
> +               test_cmp "$2" current ;;
> +       ?*)
> +               iconv -f "$3" -t utf8 >current.utf8 <current &&
> +               iconv -f "$3" -t utf8 >expect.utf8 <"$2" &&

I happen to have an old one (Cygwin):
$ iconv --version
iconv (GNU libiconv 1.11)

 t/t3900-i18n-commit.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index 5dbbcb6..b4ec2b5 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -13,8 +13,8 @@ compare_with () {
 	'')
 		test_cmp "$2" current ;;
 	?*)
-		iconv -f "$3" -t utf8 >current.utf8 <current &&
-		iconv -f "$3" -t utf8 >expect.utf8 <"$2" &&
+		iconv -f "$3" -t UTF-8 >current.utf8 <current &&
+		iconv -f "$3" -t UTF-8 >expect.utf8 <"$2" &&
 		test_cmp expect.utf8 current.utf8
 		;;
 	esac
-- 
1.6.3.49.ge312c

[-- Attachment #2: 0001-Use-UTF-8-instead-of-utf8-for-backward-compatibility.diff --]
[-- Type: application/octet-stream, Size: 1000 bytes --]

From bb9dd160d93cb6753ab08dbc29c6ee840cfd06bc Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Thu, 14 May 2009 14:55:54 +0200
Subject: [PATCH] Use UTF-8 instead of utf8 for backward compatibility

An old iconv (GNU libiconv 1.11) does not know about utf8, it does know
UTF-8 though, which is also understood by all newer iconv implementations.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/t3900-i18n-commit.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index 5dbbcb6..b4ec2b5 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -13,8 +13,8 @@ compare_with () {
 	'')
 		test_cmp "$2" current ;;
 	?*)
-		iconv -f "$3" -t utf8 >current.utf8 <current &&
-		iconv -f "$3" -t utf8 >expect.utf8 <"$2" &&
+		iconv -f "$3" -t UTF-8 >current.utf8 <current &&
+		iconv -f "$3" -t UTF-8 >expect.utf8 <"$2" &&
 		test_cmp expect.utf8 current.utf8
 		;;
 	esac
-- 
1.6.3.49.ge312c


             reply	other threads:[~2009-05-14 13:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 13:05 Alex Riesen [this message]
2009-05-16  7:15 ` [PATCH] Use UTF-8 instead of utf8 for backward compatibility Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81b0412b0905140605o21143369ibc3147c6619c7845@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).