mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 21:10:06 +01:00
Convert a few code snippets.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
|
||||
if not wx.FontMapper.Get().IsEncodingAvailable(enc, facename):
|
||||
success, alt = wx.FontMapper.Get().GetAltForEncoding(enc, facename, False)
|
||||
if success:
|
||||
convFrom = wx.FontMapper.Get().GetEncodingName(enc)
|
||||
convTo = wx.FontMapper.Get().GetEncodingName(alt)
|
||||
text = text.decode(convFrom).encode(convTo)
|
||||
|
||||
else:
|
||||
# ...failure (or we may try iso8859-1/7bit ASCII)...
|
||||
|
||||
# ...display text...
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user