WString::setDefaultEncoding() is a good solution, but how I can get
it?
I'm currently using WString("héllö", UTF8); for every string but I
prefer your suggested solution.
Thanks
On 14 أكت, 2013 م 04:28, Wim Dumon
wrote:
I looked it up for you: QString(const char*c) in Qt4 uses
fromAscii(), in Qt5 it uses fromUtf8(). Additionally, in Qt4,
you could actually set the format interpreted by fromAscii()
by calling QTextCodec::setCodecForCStrings(); in Qt5 this
seems no longer possible.
In Wt we historically used the C++ locale for WString's
constructor for const char *. We have discussed changing the
API of WString so that UTF-8 becomes the default encoding, but
that is in fact a breaking API change that we will probably
save for a major Wt version bump.
The idea is now to add a static
WString::setDefaultEncoding(), which makes the default
encoding application-wide configurable between localencoding
and utf8. That can be made backward-compatible and allows you
to switch it to UTF-8 through a single function call in the
beginning of your application. Good idea?
BR,
Wim.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest
|
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest