Commit 511373a5 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add 'replace' argument to unicode(), because we can have non-valid characters...

add 'replace' argument to unicode(), because we can have non-valid characters in error_log (in proxy field caches) for example.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38896 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae5e0383
No related merge requests found
......@@ -30,5 +30,5 @@ else:
# Since we use UTF-8 only in PageTemplate, it is enough here. It is
# faster than the original implementation, and it is compatible with
# requests that do not contain Accept-Charset header.
return unicode(text, 'utf-8')
return unicode(text, 'utf-8', 'replace')
PreferredCharsetResolver.resolve = PreferredCharsetResolver_resolve
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment