harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-965) [text] DecimalFormat ignores settings in DecimalFormatSymbols
Date Wed, 26 Jul 2006 10:57:15 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-965?page=comments#action_12423615 ] 
            
Alexey A. Ivanov commented on HARMONY-965:
------------------------------------------

One can set another char, e.g. '@', instead of point, to test it in other locales.

> [text] DecimalFormat ignores settings in DecimalFormatSymbols
> -------------------------------------------------------------
>
>                 Key: HARMONY-965
>                 URL: http://issues.apache.org/jira/browse/HARMONY-965
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows with Russian locale
>            Reporter: Alexey A. Ivanov
>         Assigned To: Paulex Yang
>         Attachments: DecimalFormat.patch
>
>
> DecimalFormat ignores settings in DecimalFormatSymbols. It always uses what is set in
OS.
> Consider the test case:
> import java.text.DecimalFormat;
> import java.text.DecimalFormatSymbols;
> public class TestDecimalFormat {
>     public static void main(String[] args) {
>         final DecimalFormat df = new DecimalFormat();
>         System.out.println(df.format(1.02));
>         
>         final DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();
>         dfs.setDecimalSeparator('.');
>         df.setDecimalFormatSymbols(dfs);
>         System.out.println(df.format(1.02));
>         
>         System.out.println(new DecimalFormat("#.##", dfs).format(1.02));
>     }
> }
> The ouput on Harmony:
> 1,02
> 1,02
> 1,02
> The expected output (when on the RI):
> 1,02
> 1.02
> 1.02

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message