Android convert Arabic number to English Number
问题 I get the following error from the gps: Fatal Exception: java.lang.NumberFormatException Invalid double: "-٣٣٫٩٣٨٧٤" Now this is from a error that I got from a user via Fabric. It looks like arabic so I'm guessing it only happens if you have the language set to that, or your sim card? Is it possible to force the gps to send characters in the 0-9 range? Or can I somehow fix this? 回答1: Try this: String number = arabicToDecimal("۴۲"); // number = 42; private static final String arabic = "\u06f0