You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Michael Thronton (JIRA)" <ta...@jakarta.apache.org> on 2006/01/04 11:37:00 UTC

[jira] Created: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Incorrect parsing of decimals in French locale by NumberTranslator
------------------------------------------------------------------

         Key: TAPESTRY-827
         URL: http://issues.apache.org/jira/browse/TAPESTRY-827
     Project: Tapestry
        Type: Bug
  Components: Build  
    Versions: 4.0    
 Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
    Reporter: Michael Thronton
    Priority: Minor


When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-827?page=all ]

Jesse Kuhnert updated TAPESTRY-827:
-----------------------------------

    Fix Version/s: 4.1.1

> Incorrect parsing of decimals in French locale by NumberTranslator
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-827
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-827
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.0
>         Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
>            Reporter: Michael Thronton
>            Priority: Minor
>             Fix For: 4.1.1
>
>
> When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Posted by "Raphael Jean (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-827?page=comments#action_12370318 ] 

Raphael Jean commented on TAPESTRY-827:
---------------------------------------

There is a related problem with client-side JavaScript validation code: it uses the isNaN() method to validate a number, which doesn't support localized decimal and digit grouping separators.
What about disabling digit grouping altogether? (NumberFormat.setGroupingUsed(false))
This would fix client-side and server-side parsing problems with integer numbers in all locales.
Problems still remain for floating point numbers.


> Incorrect parsing of decimals in French locale by NumberTranslator
> ------------------------------------------------------------------
>
>          Key: TAPESTRY-827
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-827
>      Project: Tapestry
>         Type: Bug
>   Components: Build
>     Versions: 4.0
>  Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
>     Reporter: Michael Thronton
>     Priority: Minor

>
> When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-827?page=comments#action_12371182 ] 

Jesse Kuhnert commented on TAPESTRY-827:
----------------------------------------

A very large company is adding i8ln support into dojo for us already, so the client side issue will be resolved by the time tap 4.1 comes out. 

Is there a resolution on this one? I'm a little confused from the comments what everyone is expecting. 

> Incorrect parsing of decimals in French locale by NumberTranslator
> ------------------------------------------------------------------
>
>          Key: TAPESTRY-827
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-827
>      Project: Tapestry
>         Type: Bug
>   Components: Build
>     Versions: 4.0
>  Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
>     Reporter: Michael Thronton
>     Priority: Minor

>
> When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Posted by "Leonardo Quijano Vincenzi (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-827?page=comments#action_12370948 ] 

Leonardo Quijano Vincenzi commented on TAPESTRY-827:
----------------------------------------------------

I don't think that's a good idea, since locale-based grouping of numbers is most useful precisely when entering data (money data, for example). It allows users to easily check if the number they entered is ok. For example, what's easier to read?

1456879.34

or

1,456,879.23 

??

When editing large batches of data, not using the grouping separator would be error-prone.


> Incorrect parsing of decimals in French locale by NumberTranslator
> ------------------------------------------------------------------
>
>          Key: TAPESTRY-827
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-827
>      Project: Tapestry
>         Type: Bug
>   Components: Build
>     Versions: 4.0
>  Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
>     Reporter: Michael Thronton
>     Priority: Minor

>
> When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-827?page=all ]

Jesse Kuhnert resolved TAPESTRY-827.
------------------------------------

    Resolution: Fixed

Appears to be working correctly for me on both client and server. 

There is one catch though. By default DecimalFormat doesn't allow grouping separators to exist in the input string, so if you want that ability you'll have to give it a pattern like "#,###" where the comma will be replaced by whatever grouping separator is used in the current locale. 

> Incorrect parsing of decimals in French locale by NumberTranslator
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-827
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-827
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.0
>         Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
>            Reporter: Michael Thronton
>            Priority: Minor
>             Fix For: 4.1.1
>
>
> When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-827) Incorrect parsing of decimals in French locale by NumberTranslator

Posted by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-827?page=all ]

Andreas Andreou updated TAPESTRY-827:
-------------------------------------

    Component: Framework
                   (was: Build)

> Incorrect parsing of decimals in French locale by NumberTranslator
> ------------------------------------------------------------------
>
>          Key: TAPESTRY-827
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-827
>      Project: Tapestry
>         Type: Bug

>   Components: Framework
>     Versions: 4.0
>  Environment: Tomcat 5.0, jre 1.4.2, ie 6.0
>     Reporter: Michael Thronton
>     Priority: Minor

>
> When validating numbers using NumberTranslator with French locale incorrect parsing of a user entered decimal occurs. Example, 55 000 results in a String value of 55 being returned by NumberTranslator. Reason being that the user enters a space (0x20) as the grouping separator, however, java.text.DecimalFormat expects a non-breaking space (0xA0). The tranlsator should replace grouping separator spaces with non-breaking spaces?

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org