def html2utf8(in_html):
try:
import htmlentitydefs
-
+ except ImportError:
+ try:
+ return in_html.replace("&", "&").replace("ß", "ß\9f").replace("ä", "ä").replace("ö", "ö").replace("ü", "ü").replace("Ä", "Ä").replace("Ö", "Ö").replace("Ü", "Ü")
+ except UnicodeDecodeError:
+ pass
+ else:
# first convert some WML codes; does not work?!?!
wmldefs = [
("ß", "ß"),
except ValueError:
myprint("[Callhtml2utf8] ValueError " + key + "/" + str(codepoint))
pass
- except ImportError:
- try:
- return in_html.replace("&", "&").replace("ß", "ß\9f").replace("ä", "ä").replace("ö", "ö").replace("ü", "ü").replace("Ä", "Ä").replace("Ö", "Ö").replace("Ü", "Ü")
- except UnicodeDecodeError:
- pass
return in_html
def out(number, caller):