Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XML resource can't display µ correctly

9 views
Skip to first unread message

David Epping

unread,
Dec 26, 2003, 4:20:54 PM12/26/03
to
Hello,

in my application I have to display the character 'ต', one tme it is a
string in my C++ code, one time it is a string in a static text in an
XML resoure.

the later is not displayed correctly, it is shown as 'ยต', the first
one works perfectly.
Is there something wrong with the encoding thing? how can I change it
in wxDesigner.

<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- XML resource generated by wxDesigner from file: MicroBurner.wdr
-->
<!-- Do not modify this file, all changes will be lost! -->

<resource>

<object class="wxDialog" name="aboutdialog">
<title>About ตBurner</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="spacer">
<flag>wxALIGN_CENTER|wxALL</flag>
<border>5</border>
<size>200,25</size>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER|wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="ID_STATIC">
<style>wxALIGN_CENTRE</style>
<font>
<size>12</size>
</font>
<label>This is ตBurner 0.1 !</label>
</object>
</object>
<object class="spacer">
<flag>wxALIGN_CENTER|wxALL</flag>
<border>5</border>
<size>200,25</size>
</object>
</object>
</object>
</resource>

Vaclav Slavik

unread,
Dec 27, 2003, 5:05:16 AM12/27/03
to
Hi,

David Epping wrote:
> the later is not displayed correctly, it is shown as 'µ', the
> first one works perfectly.

Because it's supposed to be used as gettext key for translation and
since you're using ANSI build of wxWindows, it is left in UTF-8 for
better matching. There are three ways around it:
0) Use Unicode build.
1) If you don't use wxLocale for translations, don't set
wxXRC_USE_LOCALE flag at all.
2) Try this patch (not yet tested):
http://www.volny.cz/v.slavik/wx/wx-xrc-notrans.patch
For this to work, you'll have to change
<label>This is µBurner 0.1 !</label>
to
<label translate="0">This is µBurner 0.1 !</label>
I'd be grateful for testing of this patch...

Thanks,
Vaclav

--
PGP key: 0x465264C9, available from http://pgp.mit.edu/

David Epping

unread,
Dec 27, 2003, 12:21:43 PM12/27/03
to
vaclav...@matfyz.cz (Vaclav Slavik) wrote in message news:<200312271104.563...@matfyz.cz>...
> Hi,
>
> David Epping wrote:
> > the later is not displayed correctly, it is shown as 'ต', the

> > first one works perfectly.
>
> Because it's supposed to be used as gettext key for translation and
> since you're using ANSI build of wxWindows, it is left in UTF-8 for
> better matching. There are three ways around it:
> 0) Use Unicode build.
> 1) If you don't use wxLocale for translations, don't set
> wxXRC USE LOCALE flag at all.

> 2) Try this patch (not yet tested):
> http://www.volny.cz/v.slavik/wx/wx-xrc-notrans.patch
> For this to work, you'll have to change
> <label>This is Burner 0.1 !</label>
> to
> <label translate="0">This is Burner 0.1 !</label>

> I'd be grateful for testing of this patch...
>
> Thanks,
> Vaclav


Thanks for your help. the problem is, that I am using MinGW with
allready compiled lib's, so the first and last tip won't work for me,
and I can't find the wxXRC_USE_LOCALE flag in no headerfile
(setup.h?). seem's as if I have to build wxWindows myself to get this
fixed.
Thanks anyway,
David

Vaclav Slavik

unread,
Dec 27, 2003, 4:08:37 PM12/27/03
to
David Epping wrote:
> Thanks for your help. the problem is, that I am using MinGW with
> allready compiled lib's, so the first and last tip won't work for
> me,

If you're not willing to compile the library, then I indeed can't help
you.

> and I can't find the wxXRC_USE_LOCALE flag in no headerfile
> (setup.h?).

Your not looking for it hard enough, it's in xmlres.h.

VS

Robert Roebling

unread,
Dec 28, 2003, 5:52:08 AM12/28/03
to

David Epping wrote:

> in my application I have to display the character 'µ', one tme it is a


> string in my C++ code, one time it is a string in a static text in an
> XML resoure.
>

> the later is not displayed correctly, it is shown as 'µ', the first


> one works perfectly. Is there something wrong with the encoding
> thing? how can I change it in wxDesigner.

On what platform does that happen (Windows95?, XP?, GTK2?).

Robert


---------------------------------------------------------------------
Please read http://www.wxwindows.org/mlhowto.htm before posting.

To unsubscribe, e-mail: wx-users-u...@lists.wxwindows.org
For additional commands, e-mail: wx-use...@lists.wxwindows.org

Vaclav Slavik

unread,
Dec 28, 2003, 6:13:24 AM12/28/03
to
Robert Roebling wrote:
> On what platform does that happen

On every one and it's a XRC problem that wasn't yet (satisfactory)
solved.

0 new messages