This content has been marked as final. Show 8 replies
The pattern characters for grouping (",") and decimal separation (".") are automatically translated according to the locale. Or do you want to have always the same separators no matter what the user's locale is?
yes i want to have the same grouping and decimal separator character no matter the locale.
Why? Goes against everything we have learned about internationalization over the last few decades.
Well, after EJP's objection I can think only of a group of foreigners working under a different locale.
But anyway, either change the locale with
Locale.setDefault(...)Dutch, German, Greek, Portuguese e.g. have your desired separator combination.
well that's it. the locale can change but this should not. It's actually a black box application that i am adapting, so i cannot modify the source code since i do not have it but i can change the literal patterns since these are defined in a file.
I am defining these patterns in a file.That should be no problem, shouldn't it?
I only want to load them from it without having to write codeWho is loading - you or that "black box"?
If you are loading (whatever that will mean), why can't you handle the loaded data?
If the black box is loading, you can do nothing about it (nor can we). - And that box seems not to care for what you have defined in your file.
So far my present understanding of your question. But I must be missing something. So please explain. For sure, there is no parameter for the JVM to use specified decimal separators. This is all defined in code.
by loading i mean reading the patterns from the file.
the black box is doing it(reading from the file) and it's also initializing them not me. I thought if i could change the pattern itself to use the decimal separator i want it could work.
I'll figure something out
black box is doing it(reading from the file)That sounds as if there exists some description of what the black box is at least doing with the data in that file.
I thought if i could change the pattern itself to use the decimal separator i want it could work.I would also think so, provided the assumed description reads: "You can specify decimal and grouping separators in the ini file." If that's the case, turn to the black box author and complain.