Description: Set lang instead of LC_ALL to prevent decimal separator bugs
In case LC_ALL is set, unset it and set LANG instead.
Author: Gilles Filippini <pini@debian.org>
Forwarded: http://trac.navit-project.org/ticket/850
Last-Update: 2011-05-08
old
|
new
|
|
407 | 407 | main_setup_environment(2); |
408 | 408 | #endif /* _WIN32 || _WIN32_WCE */ |
409 | 409 | |
410 | | if (getenv("LC_ALL")) |
| 410 | if (getenv("LC_ALL")) { |
411 | 411 | dbg(0,"Warning: LC_ALL is set, this might lead to problems (e.g. strange positions from GPS)\n"); |
| 412 | dbg(0,"Warning: Unsetting LC_ALL and setting LANG instead as a workaround.\n"); |
| 413 | setenv("LANG", getenv("LC_ALL"), 1); |
| 414 | unsetenv("LC_ALL"); |
| 415 | } |
412 | 416 | s = getenv("NAVIT_WID"); |
413 | 417 | if (s) { |
414 | 418 | setenv("SDL_WINDOWID", s, 0); |