Parse currency with symbol: Not all case working - Java
问题 I am using java.text.NumberFormat to parse String currency which has currency symbol. It is working for some cases while fails for other. NumberFormat.getCurrencyInstance(Locale.FRANCE).parse("1 599,99 €"); //fails NumberFormat.getCurrencyInstance(Locale.FRANCE).parse("599,99 €"); //works fine Can somebody please explain why it is not working in first case? Is Joda-Money a better library for such type of parsing? 回答1: The reason that this might not work for you, is usage of invalid white