Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: D07multibyte.ztst failure on HP-UX 11.11



On Mon, 27 Apr 2009 19:26:43 +0000
Paul Ackersviller <pda@xxxxxxxxxxxxxxxx> wrote:
> On Mon, Apr 27, 2009 at 08:42:46AM +0400, Andrey Borzenkov wrote:
> > Could you verify exact byte sequence with od, xxd or like? It is quite 
> > possible to have combined vs. non-combined characters here (which look 
> > alike in printable form but have different internal representation).
> 
> Of course, should've thought of that the first time.  I've attempted
> to annotate the mismatches, but could've missed something.
> 
> 
> 0000000: 2a2a 2a20 312c 3220 2a2a 2a2a 0a21 2048  *** 1,2 ****.! H
> 0000010: ce91 4820 48ce 9248 2048 ce93 4820 48ce  ..H H..H H..H H.
>             ^            ^
> 0000020: 9448 2048 ce95 480a 2020 4841 4820 4845  .H H..H.  HAH HE
>           ^           ^
> 0000030: 4820 4855 4820 48c3 8848 2048 c389 480a  H HUH H..H H..H.
> 
> 
> 0000040: 2d2d 2d20 312c 3220 2d2d 2d2d 0a21 2048  --- 1,2 ----.! H
> 0000050: ce95 4820 48ce 9448 2048 ce93 4820 48ce  ..H H..H H..H H.
>             ^            ^
> 0000060: 9248 2048 ce91 480a 2020 4841 4820 4845  .H H..H.  HAH HE
>           ^           ^
> 0000070: 4820 4855 4820 48c3 8848 2048 c389 480a  H HUH H..H H..H.

You missed a 94 and a 92 which I've marked: the problem is again that the
sort order isn't quite as deterministic as one might hope.  It looks like
something funny happened to the characters in your original post; this may
or may not be related.  It's possible the problem is in case modification.
The desired answer is that (in the selected UTF-8 locale)

  print -oi HÎH HÎH HÎH HÎH HÎH

outputs

  HÎH HÎH HÎH HÎH HÎH

(the middle letters are all upper case Greek).  Does it work without the
-i?

The sort tests have always been arguably more trouble than their worth,
though I suppose it probably is worth spotlighting where the problems are.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author