[ 
https://issues.apache.org/jira/browse/DAFFODIL-2859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Beckerle resolved DAFFODIL-2859.
-------------------------------------
    Fix Version/s: 3.6.0
       Resolution: Won't Fix

The DFDL spec references the ICU library behavior as part of the spec., so 
desirable or not, backward compatibility of that library for it's millions of 
users is more important than tweaks to its consistency. 

This PR shows the inconsistency of the ICU library behavior in this area.

[https://github.com/apache/daffodil/pull/1106]

Unless/until the DFDL spec changes to firm up textNumberPattern behavior 
without reference to the ICU library behavior, this behavior can't change. 

So closing as won't fix. 

> dfdl:textNumberFormat "#.##" unparses 0.12 as "0.12" but should be ".12"
> ------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2859
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2859
>             Project: Daffodil
>          Issue Type: Bug
>          Components: ICU
>    Affects Versions: 3.5.0
>            Reporter: Mike Beckerle
>            Assignee: Mike Beckerle
>            Priority: Minor
>             Fix For: 3.6.0
>
>
> Due to ICU bug
>  
> [https://unicode-org.atlassian.net/browse/ICU-22558]
>  
> dfdl:textNumberPattern strings with # only, and no digits before the decimal 
> point still end up creating a 0 digit before the decimal point.
>  
> For example "#.##" should format 0.12 as ".12" without a leading zero. 
>  
> This could be worked around in daffodil code by detecting when to call the 
> `DecimalFormat.setMinimumIntegerDigits(0)` on the number format object. 
> This requires a minor analysis of the ICU number pattern. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to