classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] Currency formatting fix for DecimalFormat


From: Michael Koch
Subject: Re: [cp-patches] Currency formatting fix for DecimalFormat
Date: Thu, 30 Dec 2004 11:49:03 +0100
User-agent: KMail/1.6.2

Am Donnerstag, 30. Dezember 2004 01:05 schrieb Andrew John Hughes:
> Hi all,
>  Attached is a patch which hopefully corrects most formatting of
> currencies. java.text.DecimalFormat is now linked to
> java.util.Currency for retrieving currency symbols correctly.  Part
> of this patch (from Michael) also adds these currency symbols to
> our locale information, and their retrieval to java.util.Currency. 
> Any additions to the rather short list are welcome, as are ideas
> for sources (preferably ones that can be automated) for this
> information.  We also support variable currency symbol formatting
> using a format found in the CLDR sources.  This is used for Indian
> rupees, where values between 0 and 1 are formatted differently.
>
> 2004-12-29  Andrew John Hughes  <address@hidden>
>
>       * gnu/java/locale/LocaleInformation.java
>       Additional currency symbols.
>       * java/text/DecimalFormat.java
>       Correction of authorship < to (.
>       (scanFix): removed currency changes
>       (DecimalFormat()): documentation
>       (DecimalFormat(String)): documentation
>       (DecimalFormat(String, DecimalFormatSymbols): documentation
>       (formatInternal(double,FormatBuffer,FieldPosition)): added
> currency substitution (apologies for reformatting).
>       (format(long,FormatBuffer,FieldPosition): ditto
>       (parse(String)): corrected compile warning (naming of
> multiplier) (substituteCurrency(String,double)): new method
>       * java/text/DecimalFormatSymbols.java
>       Correction of authorship < to (.
>       (safeGetString): documentation
>       (DecimalFormatSymbols()): currency uses java.util.Currency
>       (setCurrency(java.util.Currency)): changes currency symbol
> and intl. currency symbol
>       (setInternationalCurrencySymbol(String)): sets currency
> symbol on basis of change
>       * java/text/NumberFormat.java
>       Correction of authorship < to (.
>
> 2004-12-29 Michael Koch  <address@hidden>
>
>       * gnu/java/locale/LocaleInformation.java
>       Addition of currency code to symbols mapping.
>       * java/util/Currency.java
>       (Currency()): added symbol retrieval
>       (getSymbol()): implemented

This closes around 30 of my locate mauve testcases. Please commit.
I noted that some things are different to JDK 1.4.2. I think I will 
change the mauve testcase to be using data directly from CLDR.

US$ vs. USD
TRL vs. TL


Michael
-- 
Homepage: http://www.worldforge.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]