Problems with german umlaute in tooltips and labels Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
gleuenet
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jun 25, 2008 5:54 pm
Location: Germany

Problems with german umlaute in tooltips and labels

Post by gleuenet »

I try to port my working applications from version wxDev-C++ 6.10.1 to build 7.4.2.542 on a windows 7 system (full installer).

Every time, when I enter a text with german umlaute as a label or a tooltip in the designer, compiling fails with the message "illegal byte sequence".

The designer generates a line like this:

Code: Select all

maintoolbar->AddTool(ID_ICONINSERT, wxT(""), iconinsert_BITMAP, iconinsert_DISABLE_BITMAP, wxITEM_NORMAL, wxT("[b]Einfügen[/b]"), wxT(""));
I think the problem is the macro wxT. When I manualy remove the macro, the source is compiled without problems. Another resolution is, to replace the macro with the typecast (const wChar *)"Einfügen".

But, how to realize this inside the designer? Every time, when I insert a new control, the source is rebuilded and my changes are destroyed. A possible resolution is, setting the labels and tooltips inside a setup function, but this cannot be a final resolution for a designer.

Thanks for help!

By the way: wxDev-C++ and wxwidgets are very well done frameworks for developing programs!
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Re: Problems with german umlaute in tooltips and labels

Post by tbreina »

You'll need to change the wxT to _(). Go to Tools->Designer Options. Then click on the "Code Generation Options" tab. In the dropdown box for "String internationalization" select _ (the second choice). Then click ok.

Whenever you regenerate the code, it will use the _() wrapper instead of the wxT() wrapper.

-Tony
Everybody's got something to hide except for me and my monkey.
Post Reply