Hi,

I have defined a CsvRecord with a DataField:

@DataField(pos = 1, required = true)
private Double price;

In the csv file this field has this format: XX,XX i.e. the decimal separator
is the ',' and the grouping separator is the '.'

If the VM is in ENGLISH locale/language, the records are not read correctly.
Example:

48,01 is read as 4801.0 in Java. 

I need to set the locale for this DataField. I know that exists a parameter
to format Decimal, Date, etc., but if I can't set the locale, I don't think
it's very helpful for me in this case.

Maybe the solution is to define the field as a String and then format it
using DecimalFormat class.

Any ideas?





--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-set-DataField-locale-for-Double-records-in-camel-bindy-tp5732150.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to