Ticket #11824: filezilla_thousand_sep.patch
File filezilla_thousand_sep.patch, 989 bytes (added by , 6 years ago) |
---|
-
src/engine/sizeformatting_base.cpp
3 3 #include "optionsbase.h" 4 4 #ifndef FZ_WINDOWS 5 5 #include <langinfo.h> 6 #include <locale.h> 6 7 #endif 7 8 8 9 #include <libfilezilla/format.hpp> … … 240 241 } 241 242 242 243 namespace { 244 245 static void fz__locale_setuilang() { 246 static int flag_fz__locale_setuilang = -1; 247 if (flag_fz__locale_setuilang == -1) { 248 setlocale(LC_NUMERIC, getenv("LANG")); 249 flag_fz__locale_setuilang = 0; 250 } 251 } 252 243 253 std::wstring DoGetThousandsSeparator() 244 254 { 245 255 std::wstring sep; … … 250 260 sep = tmp; 251 261 } 252 262 #else 263 fz__locale_setuilang(); 253 264 char* chr = nl_langinfo(THOUSEP); 254 265 if (chr && *chr) { 255 266 sep = fz::to_wstring(chr); … … 275 286 sep = tmp; 276 287 } 277 288 #else 289 fz__locale_setuilang(); 278 290 char* chr = nl_langinfo(RADIXCHAR); 279 291 if (!chr || !*chr) { 280 292 sep = L".";