[wxGTK] - wxString containing special characters.  [SOLVED]

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
tomay3000
Experienced Solver
Experienced Solver
Posts: 78
Joined: Mon Apr 24, 2017 4:23 am

[wxGTK] - wxString containing special characters.

Postby tomay3000 » Wed May 02, 2018 7:26 pm

Hello,
I have a little wx project which works perfectly under Windows, but when I have changed the development platform "Linux mint 18.3 x64" and "Code::Blocks svn 11362", to test it there, the code compiles without problems BUT strings containing special characters like this one:

Code: Select all

"À &propos...\tF1"
or this one

Code: Select all

"Afficher les informations à propos de cette application"
wont appear in the application at all in addition to the message box assertions that wx generates.
take a look at the following screenshots to understand what I mean:
Screenshot from 2018-05-02 07-36-38.png
Screenshot from 2018-05-02 07-36-38.png (5.11 KiB) Viewed 337 times

Screenshot from 2018-05-02 01-44-42.png
Screenshot from 2018-05-02 01-44-42.png (59.79 KiB) Viewed 337 times

Screenshot from 2018-05-02 01-42-28.png
Screenshot from 2018-05-02 01-42-28.png (56.9 KiB) Viewed 337 times


But when I add the L unicode letter before the string literals explicitly like this:

Code: Select all

L"À &propos...\tF1"
, every thing works perfectly (but it is not good practice to do so because in wxMSW it works without it).

What is the problem of this situation?
How can I solve it?

Thank you for your understanding.
Last edited by tomay3000 on Wed May 02, 2018 8:06 pm, edited 1 time in total.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2633
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: [wxGTK] - wxString containing special characters.  [SOLVED]

Postby ONEEYEMAN » Wed May 02, 2018 7:49 pm

Hi,
Adding the "L" in front of the string is a good practice for Unicode string.
The code will work in Windows as well.

Thank you.

Manolo
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 579
Joined: Mon Apr 30, 2012 11:07 pm

Re: [wxGTK] - wxString containing special characters.

Postby Manolo » Thu May 03, 2018 3:36 pm



Return to “Platform Related Issues”

Who is online

Users browsing this forum: No registered users and 2 guests