You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2007/12/03 16:34:43 UTC
[jira] Created: (TRINIDAD-849) NumberConverter (type:currency;
locale:fr_FR) does not work
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.2.3-core, 1.2.2-core, 1.2.1-core, 1.0.4-core, 1.0.3-core, 1.0.2-core, 1.0.1-core, 1.0.5-core, 1.2.4-core
Reporter: Matthias Weßendorf
Assignee: Matthias Weßendorf
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.
[jira] Resolved: (TRINIDAD-849) NumberConverter (type:currency;
locale:fr_FR) does not work
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf resolved TRINIDAD-849.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.5-core
> 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
> Fix For: 1.0.5-core
>
>
> 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.
[jira] Commented: (TRINIDAD-849) NumberConverter (type:currency;
locale:fr_FR) does not work
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ 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.