mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-17 09:17:14 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
14 lines
498 B
Python
14 lines
498 B
Python
|
|
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)...
|
|
pass
|
|
|
|
# ...display text...
|