Ticket #260 (closed task: fixed)
Problem using locale with WKTReader
| Reported by: | del | Owned by: | strk |
|---|---|---|---|
| Priority: | major | Milestone: | 3.1.1 |
| Component: | Default | Version: | 3.1.0 |
| Severity: | Annoyance | Keywords: | |
| Cc: |
Description
Hello, I spotted the following problem (on at least ubuntu and gentoo):
When LANG=fr_FR.utf8 is set... WKTReader fails reading points.
Giving "POINT (2154.7500000000000000 321.5380000000000109)" to WKTReader leads to the following error: Unable to handle the packet: ParseException?: Expected number but encountered word: '2154.7500000000000000'.
I checked in the source code... and WKTReader uses the strtod(...) function in io/StringTokenizer.cpp:76 which uses the locale to decide what looks like a number... or in French, we use "," instead of "." for the radix character.
This is kind of a problem for an application which cannot "force" the locale to be the standard C one...
