Closed orousseil closed 4 years ago
Hi, thanks for bringing that up. Are you able to cross-check with the Java 8+ RI Moneta, if the same problem occurs there as well? It should be patched, but it's good to know, if it only affects one RI or both.
Sorry, i've post in the wrong project. I have originally detect this bug in the java 8+ implementation. So I don't know if the problem is the same for java 7 but it should. I will recreate an issue for the java 8+ github project (@see https://github.com/JavaMoney/jsr354-ri/issues/193)
Are we sure this is still the case after a year? I am not familiar enough with JSR-354, but this is what I'm getting when I run the fore-mentioned example against the latest HEAD:
javax.money.format.MonetaryParseException: Unparseable number: "123,01"
I haven't checked the codebase / debugged it thoroughly, but before going there, I wanted to check whether this is still the case or something change.
@orousseil could you please help me here? Does this issue still occur when you run your fore-mentioned case against the latest HEAD? Does it pass? Do you get the error I got or you only get an error? for the second/spacing case?
Or maybe I need to configure something in my IntelliJ for this particular case to fake the FR locale? I think configuring it programmatically in the test itself should be enough.
Please have a look at https://github.com/JavaMoney/jsr354-ri-bp/blob/master/src/test/java/org/javamoney/moneta/format/MonetaryFormatsTest.java. It seems that French locale might be treated properly now, check in detail in the test class, but there is nothing ignored at least not for this one. What's definitely open is #55.
@atsticks, @otaviojava IMO this really must be fixed, there are other minor things that the BP could neglect, but the two showstoppers including this one (which was fixed in the Java 8 RI) should be resolved before we are ready for MR1.
@thodorisbais if you try to parse "123,01" without a particular locale e.g. Germany or (is it the same there?) Netherlands, it is the right behavior, the default is English.
I need to check that, Werner. Hope I can make some time during the weekend.
Hello The french thousand separator is the space character. When you parse a money amount with currency from a string it doesn't work !!
See this test case for example :