mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Set C++ global locale as well as C one, so wide to narrow works
This commit is contained in:
parent
3629a4e071
commit
70802f4574
13
main.cpp
13
main.cpp
@ -5,7 +5,7 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#include <locale.h>
|
#include <locale>
|
||||||
#include <fftw3.h>
|
#include <fftw3.h>
|
||||||
|
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
@ -129,10 +129,13 @@ int main(int argc, char *argv[])
|
|||||||
// LOG_INFO ("--------------------------- Resources ----------------------------");
|
// LOG_INFO ("--------------------------- Resources ----------------------------");
|
||||||
|
|
||||||
QLocale locale; // get the current system locale
|
QLocale locale; // get the current system locale
|
||||||
setlocale (LC_NUMERIC, "C"); // ensure number forms are in
|
|
||||||
// consistent format, do this after
|
// Set C/C++ locale used for logging etc.
|
||||||
// instantiating QApplication so
|
#if defined (Q_OS_WIN)
|
||||||
// that GUI has correct l18n
|
std::locale::global (std::locale ("C"));
|
||||||
|
#else
|
||||||
|
std::locale::global (std::locale ("en_US.UTF-8"));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Override programs executable basename as application name.
|
// Override programs executable basename as application name.
|
||||||
a.setApplicationName ("WSJT-X");
|
a.setApplicationName ("WSJT-X");
|
||||||
|
Loading…
Reference in New Issue
Block a user