Problems with unicode

MMhhh..
i found the problem, after some test with your demo code using wxSTC.
the problem is with the styles.
in fact this work:
self.StyleSetSpec(wxSTC_STYLE_DEFAULT, att['DEFAULT'] % faces)

this one doesnt:
self.StyleSetSpec(wxSTC_C_DEFAULT, att['DEFAULT'] % faces)

but i need to define all the styles for the wxSTC_C language
and all the other styles in fact wont show me the correct text.

···

Alessandro Crugnola *sephiroth* wrote:

Sorry, i forgot to mention.
I'm using wxSTC as editor

::-----Original Message-----
::From: Alessandro Crugnola *sephiroth*
::[mailto:wishmaster@sephiroth.it]
::Sent: mercoledì 24 marzo 2004 1.42
::To: wxPython-users@lists.wxwidgets.org
::Subject: [wxPython-users] Problems with unicode
::
::I'm using wxPython 2.4.2 unicode
::
::I switched my keyboard to Greek but for every key pressed in
::the keyboard in my editor window i can only see a "" added
::(not the real char) Is there a conversion to do ?
::

There are a couple possibilities (neither of which I know a lot about
currently :frowning: ) 1. Does the font being used have the right encodings
to display the greek characters? 2. If your input method is sending
unicode wide-chars then wxKeyEvent doesn't have a good way to handle
that yet, and so wxSTC is not able to do anything sensible with those
events.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

--------------------------------------------------------------------- To
unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org For
additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

i found the problem, after some test with your demo code using wxSTC.
the problem is with the styles.
in fact this work:
self.StyleSetSpec(wxSTC_STYLE_DEFAULT, att['DEFAULT'] % faces)

this one doesnt:
self.StyleSetSpec(wxSTC_C_DEFAULT, att['DEFAULT'] % faces)

but i need to define all the styles for the wxSTC_C language
and all the other styles in fact wont show me the correct text.

   You will either need to set wxSTC_STYLE_DEFAULT and call StyleClearAll or
loop over all the wxSTC_C_* styles. There is no inheritance from
wxSTC_C_DEFAULT to other wxSTC_C_* styles. wxSTC_C_DEFAULT is the starting
style for C and is used mostly for whitespace.

   Neil