[
https://issues.apache.org/jira/browse/TRINIDAD-849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547907
]
Matthias Weßendorf commented on TRINIDAD-849:
---------------------------------------------
It is not only the case for the "fr_FR" locale.
For Finland (fi_FI) it fails as well.
The NumberFormat want's a currency String in this format:
12\u00a0345,68 €
> NumberConverter (type:currency; locale:fr_FR) does not work
> -----------------------------------------------------------
>
> Key: TRINIDAD-849
> URL: https://issues.apache.org/jira/browse/TRINIDAD-849
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 1.0.1-core, 1.0.2-core, 1.0.3-core, 1.0.4-core,
> 1.0.5-core, 1.2.1-core, 1.2.2-core, 1.2.3-core, 1.2.4-core
> Reporter: Matthias Weßendorf
> Assignee: Matthias Weßendorf
> Attachments: TRINIDAD-849.patch
>
>
> The source of this problem is a JDK bug (tested against SUN), where the
> NumberFormat has some problems
> See here for the Sun JDK:
> http://bugs.sun.com/view_bug.do?bug_id=6318800
> A simple Java-test fails and shows why:
> Doing this:
> String va = "12 345,68 €";
> NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.FRANCE);
> Number n = (Number) nf.parseObject(va);
> and you'll see that n is NULL.
> Why?
> So, here it is:
> the String va contains to blanks (" "), which are between 2 and 3, and
> between 8 and € as well...
> In fr_FR, however, the *grouping separator * is not " ", but it is a
> nb space (\u00a0).
> So, my little test will pass, when the first BLANK (only) is replaced by the
> non-braking space...
> (in that case, the String would look like: "12\u00a0345,68 €";)
> I thought, that the NumberFormat actually does parse the object for me.
> Looks like (for fr_FR) I have to create a *custom parser*...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.