use standard function for decoding to unicode
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2746 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
de8de38d44
commit
6496e7cc8d
1 changed files with 2 additions and 1 deletions
|
@ -437,7 +437,8 @@ class DocumentWriteFileAdapter(object):
|
|||
#context = ti is None and self.context or ti(self.context)
|
||||
context = adapted(self.context)
|
||||
if ITextDocument.providedBy(context) or IDocument.providedBy(context):
|
||||
context.data = unicode(data.replace('\r', ''), 'UTF-8')
|
||||
#context.data = unicode(data.replace('\r', ''), 'UTF-8')
|
||||
context.data = util.toUnicode(data.replace('\r', ''))
|
||||
else:
|
||||
# don't decode files or external files even if contentType == 'text/...'
|
||||
# TODO: make use of tmpfile when using external files
|
||||
|
|
Loading…
Add table
Reference in a new issue