According the bug:
http://bugs.sun.com/view_bug.do?bug_id=4510618
it is true for Finish Locale as well.
Which I verified.
-M
On Dec 3, 2007 11:52 AM, Matthias Wessendorf [EMAIL PROTECTED] wrote:
the code does replace the regular spaces w/ non-braking spaces.
A String like 12 345,68 € contains
the code does replace the regular spaces w/ non-braking spaces.
A String like 12 345,68 € contains now two spaces and the code
if (dfs.getGroupingSeparator() == '\u00a0')
value = value.replace(' ', '\u00a0');
replaces them.
Now, the String contains two non-braking spaces.
After that,
Blake,
out of the blue, but perhaps that is a JDK bug?
I am on 1.5.0_11
On Nov 30, 2007 7:14 PM, Blake Sullivan [EMAIL PROTECTED] wrote:
Matthias,
I must be missing something. Adam
org.apache.myfaces.trinidad.convert.NumberConverter.getAsObject() to convert
the spaces that the user
Hi Blake,
looks like:
http://bugs.sun.com/view_bug.do?bug_id=6318800
-Matthias
On Nov 30, 2007 7:25 PM, Matthias Wessendorf [EMAIL PROTECTED] wrote:
Blake,
out of the blue, but perhaps that is a JDK bug?
I am on 1.5.0_11
On Nov 30, 2007 7:14 PM, Blake Sullivan [EMAIL PROTECTED] wrote:
I looked at this again this morning:
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
Matthias Wessendorf wrote:
Hi Blake,
looks like:
http://bugs.sun.com/view_bug.do?bug_id=6318800
But doesn't Adam replacing the spaces with non-breaking spaces before
passing the string off to the NumberFormatter work around this problem?
Have you stepped through the code to verify that
I did a quick JUnit test-case against the MyFaces API (which contains
the *base* number-converter)
protected void setUp() throws Exception
{
super.setUp();
mock = new NumberConverter();
mock.setLocale(Locale.FRANCE);
for fixing Trinidad-202 ([1] (was done during incubation)), we added
these lines (and some other)
DecimalFormat df = (DecimalFormat)fmt;
DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();
if (dfs.getGroupingSeparator() == '\u00a0')
value = value.replace(' ', '\u00a0');