Opened 9 years ago

Closed 7 years ago

Last modified 6 years ago

#850 closed defect/bug (fixed)

LC_ALL handling

Reported by: pini Owned by: KaZeR
Priority: major Milestone: version 0.5.1
Component: core Version: git master
Severity: normal Keywords: gps
Cc: http://wiki.navit-project.org/index.php/user:pini, sleske

Description

Hi,

Please see the Debian bug report at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625789.

I propose to go one step further than just an FAQ entry. In case LC_ALL is set, Navit should just unset it and set LANG instead to keep the localization correct.

Attaching a patch implementing this idea.

Attachments (1)

lc_all.patch (924 bytes) - added by pini 9 years ago.

Download all attachments as: .zip

Change History (13)

Changed 9 years ago by pini

comment:1 Changed 9 years ago by pini

Sorry, the URL for the Debian bug report is incorrect. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625949 instead.

comment:2 Changed 9 years ago by pini

  • Cc http://wiki.navit-project.org/index.php/user:pini added

comment:4 Changed 7 years ago by usul

  • Keywords gps added
  • Milestone set to version 0.5.1

Is this bug still appear? Looks outdated to me, but please can anybody check this against GPSD?

comment:5 Changed 7 years ago by gilles filippini

I'll need some time to check: my GTA04 phone is currently under repair. I should get it back in a couple of days.

comment:6 in reply to: ↑ 3 Changed 7 years ago by sleske

Replying to http://wiki.navit-project.org/index.php/user:pini:

Should be fixed with gpsd >= 3.1. See these commits: [...]

The links given no longer work, because gpsd migrated from BerliOS to Savannah.

The relevant commits are apparently:

  • a583495 2011-08-27 Eric S. Raymond No need to use setlocale(NUMERIC) any more, so lose the code overhead.
  • 35135b1 2011-08-27 Eric S. Raymond Avoid locale problems in the NMEA driver, too.
  • b638d52 2011-08-27 Eric S. Raymond Avoid locale problems by inlining an old BSD version of strtod().
  • 904b568 2010-12-17 Eric S. Raymond Prevent JSON parsing [...] confused by client locales other than C.
  • 5d629ca 2010-12-14 Eric S. Raymond Not having setlocale(3) is so ten years ago...
  • 728bf20 2009-03-18 Eric S. Raymond Attempt to cope with locales where the decimal separator is not dot.

So the problems were fully fixed in August 2011. The first release containing all these commits is indeed V3.1.

Should we maybe tighten the CMake checks to require gpsd 3.1+? At the moment it looks like we do not enforce any minimum version.

comment:7 follow-up: Changed 7 years ago by gilles filippini

Hi,

Just tested without the patch and with LC_ALL=fr_FR.utf8. It works fine.

Thanks.

comment:8 in reply to: ↑ 7 Changed 7 years ago by sleske

Replying to gilles filippini:

Just tested without the patch and with LC_ALL=fr_FR.utf8. It works fine.

Thanks for testing!

Then I propose we (read: I :-) ) change the CMake setup to require gpsd V3.1+, and close this as fixed. Any objections?

comment:9 Changed 7 years ago by sleske

  • Cc sleske added

comment:10 Changed 7 years ago by gilles filippini

Then I propose we (read: I :-) ) change the CMake setup to require gpsd V3.1+, and close this as fixed. Any objections?

I'm fine with that. Thanks.

Update: we should also remove the warning about LC_ALL in main.c.

Last edited 7 years ago by gilles filippini (previous) (diff)

comment:11 Changed 7 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

The Navit build (cmake & autotools) now checks for libgps>=3.1 (rev. 5642). The support for older versions was removed, along with the warning about LC_ALL.

This has also been filed as a Debian bug, so Debian can drop the lc_all.patch.

comment:12 Changed 6 years ago by sleske

  • Severity set to normal

Unfortunately, the changes had to be (mostly) reverted because N810 only has the old libgps available (see #1179). There is still a warning in the CMake build if you use an old libgps - I hope that is enough to avoid this bug in the future.

Note: See TracTickets for help on using tickets.