mirror of
https://github.com/zsh-users/zsh
synced 2024-07-21 10:14:19 +00:00
24618: avoid problems with sorting of UTF-8 characters by using sort
This commit is contained in:
parent
a6cf8b340c
commit
3dd3f72bd9
|
@ -1,3 +1,8 @@
|
|||
2008-02-27 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 24618: Test/D07multibyte.ztst: use "sort" to avoid making
|
||||
assumptions about sorting of UTF-8 files.
|
||||
|
||||
2008-02-22 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 24617: Doc/Makefile.in: add '.' to the yodl include path
|
||||
|
|
|
@ -322,10 +322,16 @@
|
|||
# We ask for case-insensitive sorting here (and supply upper case
|
||||
# characters) so that we exercise the logic in the shell that lowers the
|
||||
# case of the string for case-insensitive sorting.
|
||||
print -oi HAH HUH HEH HÉH HÈH
|
||||
# As all letters are upper case, however, sort should produce the same order.
|
||||
print -loi HAH HUH HEH HÉH HÈH >zshsort.txt
|
||||
print -l HAH HUH HEH HÉH HÈH | sort >sortsort.txt
|
||||
print Diff output should be empty
|
||||
diff zshsort.txt sortsort.txt
|
||||
print Sort in C locale
|
||||
(LC_ALL=C; print -oi HAH HUH HEH HÉH HÈH)
|
||||
0:Multibyte characters in print sorting
|
||||
>HAH HEH HÉH HÈH HUH
|
||||
>Diff output should be empty
|
||||
>Sort in C locale
|
||||
>HAH HEH HUH HÈH HÉH
|
||||
|
||||
# These are control characters in Unicode, so don't show up.
|
||||
|
|
Loading…
Reference in a new issue