public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/2420] New: de_CH: negative number formatting
@ 2006-03-06  4:58 thomas dot schwanhaeuser at aps-web dot de
  2006-03-07 21:12 ` [Bug localedata/2420] " barbier at linuxfr dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: thomas dot schwanhaeuser at aps-web dot de @ 2006-03-06  4:58 UTC (permalink / raw)
  To: glibc-bugs

Negative numbers don't get a leading "-" when formatted as a (financial) 
number like with other locales.

Expected result: -12.34
Actual result: 12.34

-- 
           Summary: de_CH: negative number formatting
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
        AssignedTo: libc-locales at sources dot redhat dot com
        ReportedBy: thomas dot schwanhaeuser at aps-web dot de
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
@ 2006-03-07 21:12 ` barbier at linuxfr dot org
  2006-03-08 11:51 ` thomas dot schwanhaeuser at aps-web dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: barbier at linuxfr dot org @ 2006-03-07 21:12 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From barbier at linuxfr dot org  2006-03-07 21:12 -------
I cannot reproduce your bug.  Can you please tell how you print
this negative amount?


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
  2006-03-07 21:12 ` [Bug localedata/2420] " barbier at linuxfr dot org
@ 2006-03-08 11:51 ` thomas dot schwanhaeuser at aps-web dot de
  2006-03-08 11:53 ` thomas dot schwanhaeuser at aps-web dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: thomas dot schwanhaeuser at aps-web dot de @ 2006-03-08 11:51 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From thomas dot schwanhaeuser at aps-web dot de  2006-03-08 11:51 -------
(In reply to comment #1)
> I cannot reproduce your bug.  Can you please tell how you print
> this negative amount?

Here is a PHP script as a demo.

If I run it, I get this as an output:

Pos:  123 456.00
Neg: 123 456.00
 Switching to locale de_DE
Pos:  123.456,00
Neg: -123.456,00




Script:

<?PHP
$posnumber=123456; $negnumber=$posnumber*(-1);

setlocale (LC_ALL, 'de_CH');
print "Pos: ".money_format('',$posnumber)."\n";
print "Neg: ".money_format('',$negnumber);

print "\n Switching to locale de_DE \n";

setlocale(LC_ALL, 'de_DE');
print "Pos: ".money_format('',$posnumber)."\n";
print "Neg: ".money_format('',$negnumber);


?>




-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
  2006-03-07 21:12 ` [Bug localedata/2420] " barbier at linuxfr dot org
  2006-03-08 11:51 ` thomas dot schwanhaeuser at aps-web dot de
@ 2006-03-08 11:53 ` thomas dot schwanhaeuser at aps-web dot de
  2006-03-08 19:56 ` barbier at linuxfr dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: thomas dot schwanhaeuser at aps-web dot de @ 2006-03-08 11:53 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From thomas dot schwanhaeuser at aps-web dot de  2006-03-08 11:53 -------
Please also note, that for de/fr/it_CH formatting it should be "123'456" 
instead of "123 456". See http://sourceware.org/bugzilla/show_bug.cgi?id=2349 
for more details.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
                   ` (2 preceding siblings ...)
  2006-03-08 11:53 ` thomas dot schwanhaeuser at aps-web dot de
@ 2006-03-08 19:56 ` barbier at linuxfr dot org
  2006-03-10  6:54 ` barbier at linuxfr dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: barbier at linuxfr dot org @ 2006-03-08 19:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From barbier at linuxfr dot org  2006-03-08 19:55 -------
> print "Pos: ".money_format('',$posnumber)."\n";
> print "Neg: ".money_format('',$negnumber);

These commands print nothing here; according to PHP documentation,
the first argument of money_format cannot be empty, it must contain
%i or %n with optional attributes.
The minus sign is then printed as expected, so it seems that there
is no bug.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
                   ` (3 preceding siblings ...)
  2006-03-08 19:56 ` barbier at linuxfr dot org
@ 2006-03-10  6:54 ` barbier at linuxfr dot org
  2006-03-10 12:48 ` barbier at linuxfr dot org
  2006-04-26  5:15 ` drepper at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: barbier at linuxfr dot org @ 2006-03-10  6:54 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From barbier at linuxfr dot org  2006-03-10 06:54 -------
After more explanations from Thomas, I can confirm that there is indeed a bug
with strfmon and the ! modifier. Here is a test case.
  Expected result: Fr.- 12.34 - 12.34
  Actual result: Fr.- 12.34 12.34

#include <monetary.h>
#include <locale.h>
#include <stdio.h>

int main()
{
	char buf[500];
	setlocale(LC_ALL, "de_CH.UTF-8");
	strfmon(buf, sizeof(buf), "%n %!n\n", -12.34, -12.34);
	printf("%s", buf);
	return 0;
}


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
                   ` (4 preceding siblings ...)
  2006-03-10  6:54 ` barbier at linuxfr dot org
@ 2006-03-10 12:48 ` barbier at linuxfr dot org
  2006-04-26  5:15 ` drepper at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: barbier at linuxfr dot org @ 2006-03-10 12:48 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From barbier at linuxfr dot org  2006-03-10 12:47 -------
Created an attachment (id=909)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=909&action=view)
Fix strfmon to not omit the negative sign

Note: this patch does not modify indentation to improve its readability.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug localedata/2420] de_CH: negative number formatting
  2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
                   ` (5 preceding siblings ...)
  2006-03-10 12:48 ` barbier at linuxfr dot org
@ 2006-04-26  5:15 ` drepper at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: drepper at redhat dot com @ 2006-04-26  5:15 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-04-26 05:15 -------
Should be fixed in CVS.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=2420

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-04-26  5:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06  4:58 [Bug localedata/2420] New: de_CH: negative number formatting thomas dot schwanhaeuser at aps-web dot de
2006-03-07 21:12 ` [Bug localedata/2420] " barbier at linuxfr dot org
2006-03-08 11:51 ` thomas dot schwanhaeuser at aps-web dot de
2006-03-08 11:53 ` thomas dot schwanhaeuser at aps-web dot de
2006-03-08 19:56 ` barbier at linuxfr dot org
2006-03-10  6:54 ` barbier at linuxfr dot org
2006-03-10 12:48 ` barbier at linuxfr dot org
2006-04-26  5:15 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).