Search found 48 matches

by csniper
Tue Feb 25, 2020 6:54 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 207

Re: string encoding in wxStreamToTextRedirector

It works in a weird way I think it is because MS windows uses UTF16.

I used a customized redirector function for my app and convert it with wxString("...", wxConvUtf8). Now I can output as expected.

Thanks anyway.
by csniper
Tue Feb 25, 2020 1:45 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 207

Re: string encoding in wxStreamToTextRedirector

Thanks, doublemax. Will try it and let you know the result.
by csniper
Sun Feb 23, 2020 1:46 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 207

Re: string encoding in wxStreamToTextRedirector

Thanks, doublemax. Now I understand the root cause.

BTW: do you think it should be fixed/supported by wxWidgets?
by csniper
Sat Feb 22, 2020 10:30 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 207

Re: string encoding in wxStreamToTextRedirector

I made a minimal example with a dialog which has a text control and two buttons. Below is the code snippet for demo the issue. void testDialog::OnAbout(wxCommandEvent& event) { std::string s("\xE6\xB5\x8B\xE8\xAF\x95"); // UTF8 TextCtrl1->Clear(); wxStreamToTextRedirector redirctor(TextCtrl1); std::...
by csniper
Sat Feb 22, 2020 9:39 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 207

Re: string encoding in wxStreamToTextRedirector

I'll try to make a minimal, compilable code sample.

I'm using wxWidgets 3.1.3. The encoding of the string in the example was UTF8(I verified). The locale of my OS is GBK.
by csniper
Sat Feb 22, 2020 2:35 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 207

string encoding in wxStreamToTextRedirector

I met a problem to display UTF8 non-ASCII string with wxStreamToTextRedirector. The string is displayed OK with other wxWidgets text control after being converted by mb_str(wxConvUTF8). As below
Image 2.png
Image 2.png (16.69 KiB) Viewed 207 times
I tried to change wxConvCurrent to wxConvUTF8 but it did not work.

Any suggestions?
by csniper
Fri Jan 17, 2020 8:02 am
Forum: C++ Development
Topic: Parsing and Displaying Markdown File
Replies: 4
Views: 292

Re: Parsing and Displaying Markdown File

doublemax wrote:
Mon Jul 08, 2019 3:48 pm
If you find a good solution, please let us know.
I did this in my app by converting markdown by Cpp-Markdown(changed to support Unicode and use xpressive) and display it with wxHtmlWindow. Not sure if anyone had a better solution.
by csniper
Fri Jan 10, 2020 5:16 am
Forum: Platform Related Issues
Topic: APP does not exit in minimized mode
Replies: 3
Views: 123

Re: APP does not exit in minimized mode

@ONEEYEMAN do you mean this is a known issue?
by csniper
Fri Jan 10, 2020 3:53 am
Forum: Platform Related Issues
Topic: APP does not exit in minimized mode
Replies: 3
Views: 123

APP does not exit in minimized mode

I used wxWidgets 3.1.3, windows 10 64bits I clicked close in the right click menu when the APP was minimized on the task bar. However, the app was still there till I click on the ICON on the task bar. The window flashed during restore and the app exited this time. If I close the APP when its window ...
by csniper
Wed Dec 25, 2019 9:06 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 603

Re: Different looking of wxChoice

The code is mixed in a mess of a complex multitab dialog.
https://github.com/LiMinggang/madedit-m ... 632d01e7df
by csniper
Mon Dec 09, 2019 3:58 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 603

Re: Different looking of wxChoice

I've changed to use wxComboBox now. It's weird that the sizer code was generated by wxSmith of CodeBlocks. I don't change it manually.
by csniper
Mon Dec 09, 2019 3:55 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 603

Re: Different looking of wxChoice

The sample looks OK. I've no idea now. It should related to the sizer setting.
by csniper
Mon Dec 09, 2019 3:28 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 603

Re: Different looking of wxChoice

I will try the sample of wxWidgets. It's hard to tell a Choice from a readonly comobox on an app. And I'd changed from wxChoice to wxCombo in my code.
by csniper
Fri Dec 06, 2019 3:08 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 603

Re: Different looking of wxChoice

Others(FC31 and Ubuntu 19.10) used Gnome as default desktop manager. Magiea 7.1 uses K and the GTK version is 3.24.8.
by csniper
Thu Dec 05, 2019 6:17 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 603

Re: Different looking of wxChoice

It uses K.