I am using embded jetty (a modified version of Start), and have not set
anything special for handling of UTF-8.  Perhaps this is what I am missing?

I also experience this problem with Russian, however the example at
http://www.wicketstuff.org/wicket13/forminput/

does not have this problem for the Double field.


Ned Collyer wrote:
> 
> The following gives the right output for num.  So I'm thinking the problem
> is somewhere in the converter or I need sleep.
> 
>         NumberFormat format = NumberFormat.getInstance(Locale.FRENCH);
>         String str = format.format(new BigDecimal(3000));
>         Number num = format.parse(str);
>         String str2 = "3 000";
>         Number num2 = format.parse(str2);
>         System.out.println("str = " + str);
>         System.out.println("num = " + num);
>         System.out.println("str2 = " + str2);
>         System.out.println("num2 = " + num2);
> 
> ** edit **
> Actually... looks like the separator is some funky character.. not a
> space.  And it looks like this is not translated when the form is
> resubmitted.
> 
> Specifically - the separator returned from format.format(Number) is char
> 160, but the separator used by "3 000" is 32.
> 
> Annoying to say the least!
> 
> 
> Ned Collyer wrote:
>> 
>> I have the following
>> 
>>     private class I18nForm extends Form {
>>         public I18nForm(String id) {
>>             super(id, new CompoundPropertyModel(new TestModel()));
>> 
>>             add(new RequiredTextField("bigDecimalProperty"));
>>             add(new Button("saveButton"));
>>         }
>>     }
>> 
>> This appears to work for japanese, german, english and korean.
>> However, if I choose french I get the following behaviour.
>> 
>> Input: 3000
>> Submit
>> Output: 3 000
>> -----
>> Input: 3 000
>> Submit
>> Output: 3
>> 
>> 
>> Quite annoying - I'm not sure if its actually a bug with NumberFormat in
>> core java or specifically the implementation.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/BigDecimal-converter---is-this-behaviour-correct--tp15820747p15821270.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to