[PATCH] Different system locale settings cause the export to crash

Linus Torvalds torvalds at linux-foundation.org
Sat Apr 5 11:17:25 PDT 2014


On Sat, Apr 5, 2014 at 11:04 AM, Gehad <gehadelrobey at gmail.com> wrote:
> The attached patch fixes willemf's problem.
> it set the default locale to the Minimal c locale which prevent
> put_formate() from replacing the decimal point with a comma in floating
> point numbers.

Oh. Please don't do that. Just fix the printing of the
latitude/longitude. %f is wrong, wrong, wrong, for this and other
reasons. We try to avoid floating point in subsurface for a reason.

See (for example) save-git.c: put_degrees()/show_gps() on how to do it right.

             Linus


More information about the subsurface mailing list