From 006c1e5755734d171f893c6f92a2cf54893f891e Mon Sep 17 00:00:00 2001 From: vsonnier Date: Sun, 19 Jun 2016 16:45:40 +0200 Subject: [PATCH] FIX: non-Ascii and beyond are working better now (ex: Euro symbol) --- src/CubicSDR.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp index 2ee7d21..6ec5fc1 100644 --- a/src/CubicSDR.cpp +++ b/src/CubicSDR.cpp @@ -25,6 +25,7 @@ IMPLEMENT_APP(CubicSDR) #include +#include //#ifdef ENABLE_DIGITAL_LAB //// console output buffer for windows @@ -142,6 +143,12 @@ CubicSDR::CubicSDR() : appframe(NULL), m_glContext(NULL), frequency(0), offset(0 } bool CubicSDR::OnInit() { + + //use the current locale most appropriate to this system, + //so that character-related functions are likely to handle Unicode + //better (by default, was "C" locale). + std::setlocale(LC_ALL, ""); + #ifdef _OSX_APP_ CFBundleRef mainBundle = CFBundleGetMainBundle(); CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); @@ -172,7 +179,7 @@ bool CubicSDR::OnInit() { std::streambuf *sb = std::cout.rdbuf(); std::cout.rdbuf(sb); #endif - + wxApp::SetAppName("CubicSDR");