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

Re: PATCH: math and locale

> I'm trying to come up with a circumstance in which zsh would "print" or
> otherwise output a number in a format that zzlex would then fail to read.
> I tried setting LC_ALL to a few different things and then doing "echo $x"
> where x is a floating-point parameter, but it never changed anything.
> Where else might it matter?  Output of process times or cpu percentages?
> Can we make an exhaustive list?  Or am I worrying about it too much?

No, this is a definite problem.

% LC_ALL=pl_PL
% typeset -f g
% ((g=4.4))
% echo $g
% ((g=$g + 3))
% echo $g

And also:

% LC_ALL=de_DE
% echo $g
% ((g=8.3))
% echo $g  
% printf "%f\n" $g  
printf: 8,3000000000: value not completely converted
% export LC_ALL
% printf "%f\n" $g

printf is GNU sh-utils.

As for process times:

% time sync
sync  0,00s user 0,00s system 0% cpu 0,125 total

Anything that uses convfloat() will be affected.
I can't find anything else.

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