You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/05/12 14:14:50 UTC
DO NOT REPLY [Bug 28925] -
conversion Float String
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28925>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28925
conversion Float String
------- Additional Comments From terencio@club-internet.fr 2004-05-12 12:14 -------
Hi,
I m working with tomcat 4.1.30 and Struts 1.1
My conversion from String to float or to double doesn't work.
------
My sample code:
My current Locale is "FR";
String montantp = "1789.89";
String montantv = "1789,89";
System.err.println("Le test sur les floats " );
Number cliEncours8 =
(Number) LocaleConvertUtils.convert(
montantp ,
Float.class,
getLocale(),
null);
System.err.println("storeToRecord v2 de montantp =" + cliEncours8.floatValue() );
Number cliEncours9 =
(Number) LocaleConvertUtils.convert(
montantv,
Float.class,
getLocale(),
null);
System.err.println("storeToRecord de montantv =" + cliEncours9.floatValue() );
My result :
Le test sur les floats
storeToRecord v2 de montantp =1789.0
storeToRecord v3 de montantv =1789.0
Have you got an idear ?
Thanks ..
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org