Closed skadakar closed 1 year ago
Oooog. There are four ways to go about fixing this.
The hacky way is to say, "Look for commas, and replace with periods". This would probably work in most cases, but is a bit risky.
The more appropriate way is to take the locale from the XML document (which is being tossed right now), and use that to parse number fields correctly per user. One frustration with this is that Python seemingly uses a global locale for the entire program.
Another way is to just... treat it as a string instead of a float, and send that out without casting it at all. How do other ATAK / WinTAK clients handle getting commas?
It seems, looking at the TAKServer implementation, that they are using Float.parseFloat()
, which doesn't handle internationalization. Perhaps we can just ask clients to change their localization?
For instances where they are not there exist workarounds to trick single programs. Closing out the issue.
@tkuester At least WinTAK hangs / crashes on startup if the localization does not use . and , the US way...
I've seen this happen both in the point and the track level.
Example with course: