diff --git a/ChangeLog b/ChangeLog index 36a6dcee..44923c36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,11 @@ Type: bugfix Changed: linkcheck/checker/urlbase.py + * If default encoding cannot be determined, fall back to ASCII. + Type: bugfix + Changed: linkcheck/i18n.py + Closes: SF bug #1524800 + 4.1 "Tsotsi" (released 29.5.2006) * Wait for spawned threads to finish before shutdown. Gets rid diff --git a/linkcheck/i18n.py b/linkcheck/i18n.py index ea76177c..f1bd1d6a 100644 --- a/linkcheck/i18n.py +++ b/linkcheck/i18n.py @@ -27,6 +27,10 @@ import gettext supported_languages = ['en'] default_language = 'en' default_encoding = locale.getpreferredencoding() +# It can happen that the preferrec encoding is not determinable, which +# means the function returned None. Fall back to ASCII in this case. +if default_encoding is None: + default_encoding = "ascii" def install_builtin (translator, do_unicode): """