Redirect non-English console output to wxTextCtrl

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
theHerbGarden
In need of some credit
In need of some credit
Posts: 8
Joined: Wed May 23, 2018 2:14 pm

Redirect non-English console output to wxTextCtrl

Post by theHerbGarden »

I have a wxTextCtrl being used as a log of sorts; all console outputs are being redirect therein using the following:

Code: Select all

std::cout.rdbuf(this);
I have now internationalised the program for a number of languages; wxWidgets is able to display Arabic elsewhere, but spits out absolute garbage to the wxTextCtrl via any cout statements.

If I use the .Append method it works perfectly but this will involve some serious restructuring/rewriting of code, so I'd rather avoid that.

Is there any way to make the cout streambuffer accept full utf8 strings?

Thanks!
Post Reply