#44183 [Opn->Fbk]: money_format: "!" modifier trims negative symbol for certain locales

From: Date: Sun, 15 Jun 2008 21:16:59 +0000
Subject: #44183 [Opn->Fbk]: money_format: "!" modifier trims negative symbol for certain locales
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125797@lists.php.net to get a copy of this message
ID: 44183 Updated by: hholzgra@php.net Reported By: mail at tomsommer dot dk -Status: Open +Status: Feedback Bug Type: Math related Operating System: Linux PHP Version: 5.2.5 -Assigned To: +Assigned To: hholzgra New Comment: What is the exact linux distribution version you are using? I just tested this with Ubuntu 8.04 and the bundled PHP 5.2.4 version and got a "-1.00" result just fine with da_DA.UTF-8 ... Previous Comments: ------------------------------------------------------------------------ [2008-02-20 10:31:55] mail at tomsommer dot dk 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 this bug report at http://bugs.php.net/?id=44183&edit=1

« previous php.bugs (#125797) next »