Richtext encoding

Hello wxPython friends,

I have a problem with the richtext xml handler.
I m forced to replace all the character from a text with special character.
zz = zz.replace(“°”,“°”)
zz = zz.replace(“é”,“é”)
zz = zz.replace(“è”,“è”)
zz = zz.replace(“ê”,“ê”)
zz = zz.replace(“ë”,“ë”)

Is there a way to encode a string in a format that is compatible with richtextctrl without create a long table of replace?

Thx in advance

Message
Can you say a little more about the problem you are seeing? I haven’t had any problems with accented characters, or even chinese characters in terms of rendering, saving and loading via XML, etc. with the standard richtext XML file handler.

David

···

-----Original Message-----
From:
wxpython-users@googlegroups.com [mailto:wxpython-users@googlegroups.com] ** On Behalf Of** Christian Démolis
Sent: Monday, January 18, 2010 9:37 AM
To: wxpython-users@googlegroups.com
Subject:
[wxPython-users] Richtext encoding

Hello wxPython friends,

I have a problem with the richtext xml handler.
I m forced to replace all the character from a text with special character.
zz = zz.replace(“°”,“°”)
zz = zz.replace(“é”,“é”)
zz = zz.replace(“è”,“è”)
zz = zz.replace(“ê”,“ê”)
zz = zz.replace(“ë”,“ë”)

Is there a way to encode a string in a format that is compatible with richtextctrl without create a long table of replace?

Thx in advance

Are you setting the encoding type in the xml header?

···

On 1/18/10 7:36 AM, Christian D�molis wrote:

Hello wxPython friends,

I have a problem with the richtext xml handler.
I m forced to replace all the character from a text with special character.
         zz = zz.replace("�","°")
         zz = zz.replace("�","é")
         zz = zz.replace("�","è")
         zz = zz.replace("�","ê")
         zz = zz.replace("�","ë")
...

Is there a way to encode a string in a format that is compatible with
richtextctrl without create a long table of replace?

--
Robin Dunn
Software Craftsman