Page 1 of 1

wxString::FromCDouble is locale dependent

Posted: Mon Jun 23, 2014 11:24 am
by PeterO
Hello there.

On initializing my application I want to set the global locale to the system locale by calling wxLocale.Init();
But wxLocale.Init() only sets the C global locale to the system locale.
To set the C++ global locale as well I call: std::locale::global(std::locale(setlocale(LC_ALL, NULL)));
However when I use wxString::FromCDouble it now returns the format according to the system locale.
There's now difference anymore between wxString::FromDouble and wxString::FromCDouble.
It seems that FromCDouble is locale dependent.
Is this is a bug?

Regards,
Peter

Re: wxString::FromCDouble is locale dependent

Posted: Mon Jun 23, 2014 12:23 pm
by doublemax
I haven't tried this myself, but if you can reproduce it with a small patch to the "minimal" sample, please open a bug report at http://trac.wxwidgets.org/

Re: wxString::FromCDouble is locale dependent

Posted: Mon Jun 23, 2014 1:10 pm
by PeterO
Ok, I've made a new ticket: #16343

Re: wxString::FromCDouble is locale dependent

Posted: Mon Jun 30, 2014 6:41 am
by PeterO
Ticket #16343 has been fixed.