[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#226047: libc6: Bad strfmon() formatting should be fixed (patch in upstream CVS)



Package: libc6
Version: 2.3.2.ds1-10
Severity: normal

The current strfmon() in glibc do not format currency correctly and in
accordence with the POSIX standard.  This has been fixed in glibc CVS.
These are the relevant patches:

  (libc/)

  2004-01-01  Petter Reinholdtsen  <pere@hungry.com>

	* stdlib/strfmon.c: Make formatting of left-justified currency
	values match the POSIX standard.  When using format string
	"[%-14#5.4n]" to print -123.45, the result should be
	"[-$   123.4500 ]", not "[-$123.4500    ]".

  2003-11-30  Petter Reinholdtsen  <pere@hungry.com>

	* stdlib/strfmon.c: Correct formatting of international currency
	values.  The international currency formatting should prefer the
	int_* values if they are set for a locale, and use the domestic
	values if the int_* values are unset.

  (libc/localedata)

  2004-01-01  Petter Reinholdtsen  <pere@hungry.com>

	* tst-fmon.data: Add simple test to check left justified currency
	values in the C locale.

  2003-11-30  Petter Reinholdtsen  <pere@hungry.com>

	* tst-fmon.sh: Allow quotes around the result string, to make it
	easier to see important whitespace.
	* tst-fmon.data: Likewise.

	* tst-fmon.sh: Clean up output, unify capitalization and output order.
	* tst-fmon.c: Likewise.

	* tst-fmon.data: Add test for international currency formatting.
	* tst-fmon-locales/tstfmon_n01y12: Add definitions for int_* fields.
	* tst-fmon-locales/tstfmon_n02n40: Likewise.
	* tst-fmon-locales/tstfmon_n10y31: Likewise.
	* tst-fmon-locales/tstfmon_n11y41: Likewise.
	* tst-fmon-locales/tstfmon_n12y11: Likewise.
	* tst-fmon-locales/tstfmon_n20n32: Likewise.
	* tst-fmon-locales/tstfmon_n30y20: Likewise.
	* tst-fmon-locales/tstfmon_n41n00: Likewise.
	* tst-fmon-locales/tstfmon_y01y10: Likewise.
	* tst-fmon-locales/tstfmon_y02n22: Likewise.
	* tst-fmon-locales/tstfmon_y22n42: Likewise.
	* tst-fmon-locales/tstfmon_y30y21: Likewise.
	* tst-fmon-locales/tstfmon_y32n31: Likewise.
	* tst-fmon-locales/tstfmon_y40y00: Likewise.
	* tst-fmon-locales/tstfmon_y42n21: Likewise.

	* locales/en_US: Correct spacing for international
	currency formatting, now that strfmon() works better.

	* locales/ja_JP: Correct currency position and
	spacing now that strfmon() work better.

  2003-06-15  Petter Reinholdtsen  <pere@hungry.com>

	* tst-fmon.c (main): Remove unused variable 'monval'.

	* tst-fmon.sh: Make sure all tests are executed before an error
	code is reported to make.
	* tst-numeric.sh: Likewise.

  2003-04-30  Petter Reinholdtsen  <pere@hungry.com>

	* tst-fmon.c: Report name of locale if setlocale() fails.
	* tst-numeric.c: Likewise.

	* tst-fmon.sh: Ignore lines starting with hash '#' in the data file.
	* tst-numeric.sh: Likewise.

Please include these patches in the Debian version of glibc.  I assume
you are able to extract the patches from CVS, but let me know if you
want me to do it and submit the patch here.



Reply to: