Re: Re[2]: Cannot enter non-English characters
Сергей Коныгин <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks! In this case, how can I correctly convert a floating number to a string in a format "%.15e" using a dot as decimal separator? суббота, 1 февраля 2025 г. в 19:22:56 UTC+4, Vadim Zeitlin: > On Fri, 31 Jan 2025 22:02:20 -0800 (PST) Сергей Коныгин wrote: > > > Using wxUILocale::UseDefault() solves this problem. > > But the translation between floating point numbers and strings stops > > working (as I understand it, the dot changes to a comma). Can I > > independently set the decimal point? > > No, unfortunately GTK requires C locale to be set to correspond to the > language used by the program. You can use either wx-provided functions such > as wxString:ToCDouble() and FromCDouble(), or C++ [io]stringstream, for > which you can call imbue(std::locale::classic()), for locale-independent > formatting. > > Regards, > VZ > > -- > TT-Solutions: wxWidgets consultancy and technical support > https://www.tt-solutions.com/ > -- Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/wx-users/cba70674-122e-49d1-8838-873c35e7230an%40googlegroups.com.