-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MatrixIO.printJava should ignore default locale #161
Comments
@HGuillemet so is the issue that it's conforming to your locale or the issue that it is not conforming to your locale? Either way, what I think you're requesting is a function like this:
|
Likely that it is conforming to the locale. I've run into this a few times on German systems that would print numbers in a format that Java fails to parse later on. |
Right. |
Just pushed the change to make it default to US. There's a static variable that you can change to change the local. |
FYI This fix is going to be released in 0.41.1 |
Thank you for this fix. Also you'll break more existing codes. |
I was considering that but decided to go for it being universally compatible by default. This way pasted output can be used by everyone. Doesn't seem to be any really clean option here. I guess I'll see if people complain. Now the JavaDoc should mention that static variable, which it currently doesnt. |
MatrixIO.printJava
formats numbers usingPrintStream.printf(format, x)
.So if our default locale uses a comma for decimal separator, we end up with numbers not conforming to Java.
printf
has an overload taking an explicit locale. I guess it's the one to use, specifyingLocale.US
or similar.The text was updated successfully, but these errors were encountered: