All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: <prohaska@zib.de>, Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: t0050-filesystem.sh unicode tests borked on dash shell
Date: Tue, 21 Dec 2010 21:29:38 +0100	[thread overview]
Message-ID: <201012212129.39141.trast@student.ethz.ch> (raw)
In-Reply-To: <4D1105B5.5070703@ramsay1.demon.co.uk>

Ramsay Jones wrote:
>     $ ls trash\ directory.t0050-filesystem/unicode/
>     \x61\xcc\x88

The printf at the top evidently does not interpolate \xAA sequences.
Since my 'man 1p printf' POSIX manpage only mandates \AAA octal
sequences, maybe we should use that instead.  Can you verify that the
patch below works for you?

Judging from

  git grep '\\x[0-9a-f][0-9a-f]' t

this is the only instance of this problem, the rest are in Perl code.

--- 8< ---
Subject: t0050: replace \xAA by \AAA in printf

POSIX does not mandate the hex escape sequences, and thus dash's
built-in printf does not expand them.  Use octal escapes instead.

diff --git c/t/t0050-filesystem.sh i/t/t0050-filesystem.sh
index 057c97c..87bf1ff 100755
--- c/t/t0050-filesystem.sh
+++ i/t/t0050-filesystem.sh
@@ -4,8 +4,8 @@ test_description='Various filesystem issues'
 
 . ./test-lib.sh
 
-auml=`printf '\xc3\xa4'`
-aumlcdiar=`printf '\x61\xcc\x88'`
+auml=`printf '\303\244'`
+aumlcdiar=`printf '\141\314\210'`
 
 case_insensitive=
 unibad=

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  parent reply	other threads:[~2010-12-21 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 19:53 t0050-filesystem.sh unicode tests borked on dash shell Ramsay Jones
2010-12-21 20:27 ` [PATCH] t0050: fix printf format strings for portability Jonathan Nieder
2010-12-21 21:26   ` Junio C Hamano
2010-12-28 18:05   ` Ramsay Jones
2010-12-21 20:29 ` Thomas Rast [this message]
2010-12-21 20:43 ` t0050-filesystem.sh unicode tests borked on dash shell 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=201012212129.39141.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=prohaska@zib.de \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.