|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-12-10 12:36 UTC] joey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 14:00:01 2026 UTC |
The bug is still present in 4.0B3. This code <% setlocale ('LC_ALL', "de_DE"); // or other locale with dec. sep = , $v = 3; $v /= 4; print $v; echo $v; printf ("%7.2f", $v); echo "\n"; $z = 3.4; echo $z; echo "\n"; ?> yields: Connection: close Content-Type: text/html 0,750,75 0.75 3 the last line should read 3.4. Additionally: The locale-state seems to be persistent across two GETs of the respective script. There seems to be a basic misconception of locales in a high level language like PHP (Perl seemd to have the same problem some time ago): You cannot simply call the C-function setlocale! Stefan