From 25044ce08bbd79c580475df97ee69fe0cc52a095 Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 13 Oct 2005 12:49:52 +0000 Subject: [PATCH] print errors in the preferred encoding git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2864 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/checker/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linkcheck/checker/__init__.py b/linkcheck/checker/__init__.py index 1dd8338a..cccaf1cf 100644 --- a/linkcheck/checker/__init__.py +++ b/linkcheck/checker/__init__.py @@ -19,6 +19,7 @@ Main functions for link checking. """ import time +import locale import sys import os import cgi @@ -153,7 +154,8 @@ acap # application configuration access protocol ignored_schemes_re = re.compile(ignored_schemes, re.VERBOSE) -stderr = codecs.getwriter("iso8859-1")(sys.stderr, errors="ignore") +_encoding = locale.getpreferredencoding() +stderr = codecs.getwriter(_encoding)(sys.stderr, errors="ignore") def internal_error (): """