+
+ // As we get our decimal point separator from Win32 and not the
+ // CRT there is a possibility of mismatch between them and this
+ // can easily happen if the user code called setlocale()
+ // instead of using wxLocale to change the locale. And this can
+ // result in very strange bugs elsewhere in the code as the
+ // assumptions that formatted strings do use the decimal
+ // separator actually fail, so check for it here.
+ wxASSERT_MSG
+ (
+ wxString::Format("%.3f", 1.23).find(str) != wxString::npos,
+ "Decimal separator mismatch -- did you use setlocale()?"
+ "If so, use wxLocale to change the locale instead."
+ );
+ }