Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sh emulation POSIX non-conformances ("inf"/"Inf" in arithmetic expressions)
On 2021-04-24 19:18:25 -0700, Bart Schaefer wrote:
> On Sat, Apr 24, 2021 at 4:03 PM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > both for the behavior and documentation, be careful with the
> > locales, in particular in Turkish ones. I don't know whether
> > this is expected in zsh, but...
> >
> > zira% zsh -fc 'export LC_ALL=fr_FR.utf8; echo $((Inf)) $((inf))'
> > Inf Inf
> > zira% zsh -fc 'export LC_ALL=tr_TR.utf8; echo $((Inf)) $((inf))'
> > Inf 0
>
> schaefer[856] ls -ld /usr/share/i18n/locales/tr_TR
> -rw-r--r-- 1 root root 168368 Dec 16 03:04 /usr/share/i18n/locales/tr_TR
> schaefer[857] Src/zsh -fc 'export LC_ALL=tr_TR.utf8; echo $((Inf)) $((inf))'
> Inf Inf
>
> ??
You may have non-standard Turkish locales, because the following line
in math.c is obviously incorrect:
else if (strncasecmp(p, "Inf", 3) == 0) {
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author