mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 21:04:41 +00:00
do not just ignore but replace wrong encoded chars
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2231 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
dd21106cb5
commit
0aabca8444
1 changed files with 3 additions and 3 deletions
|
|
@ -87,8 +87,8 @@ class Logger (object):
|
|||
|
||||
def encode (self, s):
|
||||
"""
|
||||
Encode string with configured output encoding. Encoding
|
||||
errors are ignored.
|
||||
Encode string with configured output encoding. Wrong encoded
|
||||
characters are replaced.
|
||||
|
||||
@param s: string to encode
|
||||
@type s: unicode
|
||||
|
|
@ -97,7 +97,7 @@ class Logger (object):
|
|||
"""
|
||||
if not isinstance(s, unicode):
|
||||
raise ValueError("tried to encode non-unicode string %r" % s)
|
||||
return s.encode(self.output_encoding, "ignore")
|
||||
return s.encode(self.output_encoding, "replace")
|
||||
|
||||
def check_date (self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue