You can split the string into characters and scroll through the characters using, for example, toCharArray() , and then convert each number to its English.
String number = ""; for (char c : txtProductSalePrice.toCharArray()) { if (c == "Ϋ±") { number.concat("1"); continue; } if (c == "Ϋ²") { number.concat("2"); continue; } .... } return new BigDecimal(number).doubleValue();
I'm sure that maybe this could have been improved, but I'm not quite sure if char supports non-literal letters.
source share