Built with from Grav and Hugo
–– coding: utf-8 – #decode import HTMLParser h = HTMLParser.HTMLParser() print h.unescape('許功蓋') 許功蓋 #encode a = u'許功蓋' a.encode('ascii', 'xmlcharrefreplace') '許功蓋'