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

Re: UTF-8 locales on BSDs do not support collation correctly



 On Wed, Jan 25, 2017 at 3:27 PM, Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> After the commit:
>
> commit 0e33ebc6514c8719513f3f20161274f6af2caffc
> Author: Mikael Magnusson <mikachu@xxxxxxxxx>
> Date:   Tue Jan 24 12:01:57 2017 +0100
>
>     posted: Make D07 recognize more spellings of pl_PL.UTF-8
>
> diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
> (snip)
> -  if [[ -n ${$(locale -a 2>/dev/null)[(R)pl_PL.utf8]} ]]; then
> +  if [[ -n ${$(locale -a 2>/dev/null)[(R)pl_PL.(utf8|UTF-8)]} ]]; then
>
>
> the test D07multibyte.ztst fails on macOS and freeBSD.
> On these OSs (and maybe on other BSDs), the locale pl_PL.UTF-8 exists
> but it does not support collation correctly (it just uses ASCII collation).
>
> Are there any OS which uses UTF-8 (instead of utf8) for locale name
> and supports the collation correctly?

It works fine on OpenBSD. However, I had to revert 40333 for it to
compile there. Adding some extra CCs since the mailing list probably
still doesn't work.

gmake[2]: Entering directory '/home/mikachu/code/zsh/Src'
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall
-Wmissing-prototypes -O2  -o watch.o watch.c
watch.c: In function 'readwtab':
watch.c:488: warning: implicit declaration of function 'setutent'
watch.c:489: warning: implicit declaration of function 'getutent'
watch.c:489: warning: assignment makes pointer from integer without a cast
watch.c:512: warning: implicit declaration of function 'endutent'
gmake[3]: Entering directory '/home/mikachu/code/zsh/Src/Builtins'
gmake[3]: Leaving directory '/home/mikachu/code/zsh/Src/Builtins'
gmake[3]: Entering directory '/home/mikachu/code/zsh/Src/Modules'
gmake[3]: Leaving directory '/home/mikachu/code/zsh/Src/Modules'
gmake[3]: Entering directory '/home/mikachu/code/zsh/Src/Zle'
gmake[3]: Leaving directory '/home/mikachu/code/zsh/Src/Zle'
gmake[2]: Leaving directory '/home/mikachu/code/zsh/Src'
Updated `stamp-modobjs'.
rm -f zsh
gcc  -s -Wl,-E -o zsh main.o  `cat stamp-modobjs`   -lncursesw -lm  -lc
string.o: In function `wcs_ztrdup':
string.c:(.text+0x534): warning: warning: wcscpy() is almost always
misused, please use wcslcpy()
builtin.o: In function `cd_try_chdir':
builtin.c:(.text+0x64c3): warning: warning: strcpy() is almost always
misused, please use strlcpy()
params.o: In function `randomgetfn':
params.c:(.text+0x23eb): warning: warning: rand() may return
deterministic values, is that what you want?
builtin.o: In function `fclist':
builtin.c:(.text+0x1054c): warning: warning: strcat() is almost always
misused, please use strlcat()
builtin.o: In function `bin_print':
builtin.c:(.text+0xa7e0): warning: warning: sprintf() is often
misused, please use snprintf()
watch.o: In function `readwtab':
watch.c:(.text+0x43): undefined reference to `setutent'
watch.c:(.text+0x48): undefined reference to `getutent'
watch.c:(.text+0x73): undefined reference to `getutent'
watch.c:(.text+0x83): undefined reference to `endutent'
collect2: ld returned 1 exit status
Makefile:227: recipe for target 'zsh' failed
gmake[1]: *** [zsh] Error 1
gmake[1]: Leaving directory '/home/mikachu/code/zsh/Src'
Makefile:188: recipe for target 'all' failed
gmake: *** [all] Error 1


-- 
Mikael Magnusson



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