#44183 [NEW]: money_format: "!" modifier trims negative symbol for certain locales

From: Date: Wed, 20 Feb 2008 10:31:55 +0000
Subject: #44183 [NEW]: money_format: "!" modifier trims negative symbol for certain locales
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122495@lists.php.net to get a copy of this message
From: mail at tomsommer dot dk Operating system: Linux PHP version: 5.2.5 PHP Bug Type: Unknown/Other Function Bug description: money_format: "!" modifier trims negative symbol for certain locales Description: ------------ money_format trims the negative symbol for certain locales. For danish, this means that the string "kr -1,00" is trimmed to "1,00" if the "!" modifier is given, trimming more than just the currency symbol. Reproduce code: --------------- setlocale(LC_ALL, 'da_DK', 'danish'); echo money_format('%!n', -1); Expected result: ---------------- -1,00 Actual result: -------------- 1,00 -- Edit bug report at http://bugs.php.net/?id=44183&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44183&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44183&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44183&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44183&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44183&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44183&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44183&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44183&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44183&r=support Expected behavior: http://bugs.php.net/fix.php?id=44183&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44183&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44183&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44183&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44183&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44183&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44183&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44183&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44183&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44183&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44183&r=mysqlcfg

« previous php.bugs (#122495) next »