"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2024 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['robot_base', 'get_error']
break
content_stripped = content.strip()
if content_stripped and charset:
- content_stripped = content_stripped.decode(
- charset, 'replace')
+ try:
+ content_stripped = content_stripped.decode(
+ charset, 'replace')
+ except LookupError:
+ charset = None
+ self.log(" unknown charset "
+ "in Content-Type header")
if content_stripped and is_html:
parser = parse_html(
content_stripped, charset, self.log)
bookmark.icon
)
else:
- self.log(" no icon :"
+ self.log(" no icon : "
"bad content type '%s'"
% content_type
)