You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mathieu Vézeau (JIRA)" <de...@myfaces.apache.org> on 2007/10/10 01:40:50 UTC

[jira] Created: (MYFACES-1743) Allow NumberConverter to recognize both breaking and non-breaking spaces as grouping separators in the French locale

Allow NumberConverter to recognize both breaking and non-breaking spaces as grouping separators in the French locale
--------------------------------------------------------------------------------------------------------------------

                 Key: MYFACES-1743
                 URL: https://issues.apache.org/jira/browse/MYFACES-1743
             Project: MyFaces Core
          Issue Type: Improvement
          Components: General
    Affects Versions: 1.1.5
         Environment: Client: IE 7 and Firefox 2.0 on Windows XP Pro
Server: Windows Server 2003, Java 1.6, Tomcat 5.5, JSF 1.1.5
            Reporter: Mathieu Vézeau


In the French locale (fr) and possibly others, the grouping separator used by DecimalFormat is the non-breaking space character (unicode '\u00A0'). However, when a user enters a space in an HTML text field, both IE and Firefox on Windows send a normal space (unicode '\u0020'). As a result, the grouping separator is not recognized and the number is truncated: 10 000 becomes 10 after parsing.

While JSF is technically correct here (it just delegates to DecimalFormat), it would be nice if NumberConverter was modified to also accept normal spaces as grouping separators. One way to do this would be to simply replace all normal spaces by non-breaking ones in the input string, no matter what the locale. The only downside that I see is that this could be considered a 'hack', i.e. not a very elegant solution.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.