My app writes files with strings generated by code like:

s = String.format("%6.2f\r\n", zValue);

where zValue is a float.  Then it reads those files back in later and
parses them, expecting to see a number with a decimal point (.).  This
works fine for my phone and for all the Android devices in the US that
I have tested.  But now a user from Germany reported troubles that I
have traced down to the fact that on German phones, the above
statement produces numbers that use the comma (,) as the decimal
delimiter, and so my parsing code that looks for decimals with periods
does not work.  It appears to be a localization issue.  How can I
force all my strings generated with ".format" to use US localization
standards in this regard?  (My files are totally for internal use by
the app and so do not need to be rendered in the local convention.)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to