wxLOCALE_DECIMAL_POINT always comma on wx2.9
Riccardo Cohen
rcohen at articque.com
Sun Jan 27 13:44:45 PST 2008
Hi
This code seems to answer the wrong result :
wxLocale loc;
//int langid=wxLANGUAGE_FRENCH;
//int langid=wxLANGUAGE_ENGLISH_US;
int langid=wxLANGUAGE_ENGLISH_UK;
loc.Init(langid,0);
const wxLanguageInfo *info=wxLocale::GetLanguageInfo(langid);
wxString lang=info->CanonicalName;
wxString
dec=wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,wxLOCALE_CAT_NUMBER);
out->SetValue(wxString::Format(wxT("in %s dec=%s"),lang,dec));
I get a comma, while I should have a point.
I tried on windows and mac, it is the same.
I tried with the 3 locale (fr,uk,us), it is always a comma.
What am I doing wrong ?
Actually I do that because I need to store double in a text
representation portable on many languages. And at read time, I need to
know what is the current decimal point before calling wxString::ToDouble() !
Thanks for any info.
--
Très cordialement,
Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49
More information about the wx-users
mailing list