3

I'm working on a project in which you can draw lines on a canvas and save it in a textfile with coordinates for each line.

However, when I try to save it with this method, and write it to the textfile, all dots are replaced by commas.

I assume this is due to my language on the PC being European, so I've tried to find a workaround by setting the Locale of the printstream to Locale.US, but without luck.

How can I possibly fix this without changing the language of my entire PC?

  • 3
    Please copy/paste the code itself rather than pasting links to images of it. – daniu Feb 13 '19 at 09:21
  • Welcome to Stack Overflow! The images you've linked to (which, as has been mentioned would be better as copied and pasted into the question) all show the same thing. – DaveyDaveDave Feb 13 '19 at 09:29

1 Answers1

3

Update: I fixed this by changing the Locale in my 'main' method:

Locale.setDefault(new Locale("en", "US"));