git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@188
fdd5c36f-1aea-0310-aeeb-
c58d7e2b6c23
meta = head.find(_find_contenttype, recursive=False)
if meta:
- __charset = meta.get("content").lower().split('charset=')[1].split(';')[0]
- meta_charset = _charset == __charset
+ try:
+ __charset = meta.get("content").lower().split('charset=')[1].split(';')[0]
+ except IndexError: # No charset in the META Content-Type
+ meta_charset = False
+ else:
+ meta_charset = _charset == __charset
else:
meta_charset = False