Closed voidzero closed 10 years ago
Yea, sorry, I don't know anything about other countries. Is there a simple solution to this, without having to rewrite a lot of code?
Problem is that you use ',' as separator in map parameter of .redshift grc. Any other symbol will solve problem. [ in opt_write_config() (src/options.c:448) you use system LC_NUMERIC, but in opt_parse_map() (src/options.c:334) you forgot that *localeconv()->decimal_point may be ','. This (https://gist.github.com/naszar/60207b603bf66d699203 ) may be quick but not accurate fix.
Sorry, but my previous patch is not complete. This one (https://gist.github.com/naszar/e5902e341467935ce383) is are tested and completely solve issue with locales.
Thanks for this, did you test this on linux and win32 side? I'm recently upgraded comps and haven't had time to install linux yet. I'll get this incorporated once I do that.
Yes, I test it. I use ArchLinux x64 and currently, redshiftgui compiled from your git repo, but I can test binary if you want.
I'm doubt about win32. Switching of locales is side effect of gtk. And I can help only with linux version.I now nothing about win32 locales.. maybe setlocale(LC_NUMERIC,"") will make windows version broken.. maybe #ifndef _WIN32 help?
And, sorry for first broken patch.. only when I make some fixes for your code (to compile it.. yes, source at github is broken) and run it, I found that locale not switched in moment of reading config.
Ok thanks. Source is broken for linux? Do you know what the problem is? I guess I'll have to hurry up and install Arch.
https://gist.github.com/naszar/7ccf78f770e90d335011
Yes, there are build errors in linux version. I'm not sure in my CMakeLists.txt fixes for finding mathlib and includes for iup, but with this patch I can build your program.
Please check to see if the 0.2.4 fixes the locale issue.
I have tested git version and it works fine with locales for me. And builds - thank you.
k, I will publish the releases shortly
I think there is a locale issue that causes some problems, for example with the latitude / longitude.
Some locales (e.g. in Europe) write "two thousand and one half" as "2.000,5", other locales (e.g. the US) write it as "2,000.5". It seems that redshiftgui does not take this in consideration...