Trouble displaying utf8 and dbcs in an STC

> on Windows 2000 (Chinese locale, with unicode)
> python 2.3.2, wx 2.4.2.4u
> The Chinese doesn't display without modification, as
> it does above, but it wouldn't be expected to, since
> this is a unicode version. It won't display with the
> above 2 lines of code, either. Additionally, I can't
> get the utf8 to display, either:
>
> utf8Txt = unicode("?D1ú","gb2312").encode("utf8")
> stc.SetText( utf8Txt )

Try passing the unicode string directly. In the Unicode
build the wxSTC
will only accept unicode strings, the conversion to/from utf8 for
Scintilla happens internally.

Thanks, Robin, that works well!
Additionally, I found that in wx.py, the GTK version attempts to
import the locale from the OS, but the Windows version doesn't.
That's why similar code worked on Linux, but not Windows.
After adding "locale.setlocale( locale.LC_ALL, '' )", the Windows
locale is imported into the Python program, and the gb-encoded
text is displayed correctly in the STC. (Specifying various
locales/charsets didn't work, as in
"locale.setlocale( locale.LC_ALL, 'zh_CN.gbk' )", perhaps
because MS uses their own names--locale.getlocale() returns
["Chinese_People's Republic of China", "936"]) The interesting
thing is, with the locale set, I can pass either unicode-encoded
or gb-encoded Chinese to the STC, and it displays either
correctly. The unicode-encoded version will of course be much
better for mixing Chinese and English in different fonts, so
that's what I'll use.