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-25 15:00:03 -0700, Bart Schaefer wrote:
> On Sun, Apr 25, 2021 at 1:18 PM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > math.c is obviously incorrect:
> >
> >                     else if (strncasecmp(p, "Inf", 3) == 0) {
> 
> What should it (and the corresponding NaN line) be, then?

This depends on the expected behavior: Should it match only
[Ii][Nn][Ff], or also the lowercase and uppercase versions?
... so that in Turkish locales under Debian: [Iıİi][Nn][Ff],
i.e. also with
  U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
  U+0131 LATIN SMALL LETTER DOTLESS I

-- 
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