mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-31 16:10:07 +01:00
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...
|