From 6496e7cc8d8af4fcdc25c1eb0ca786bf2bb9d402 Mon Sep 17 00:00:00 2001 From: helmutm Date: Wed, 9 Jul 2008 08:19:19 +0000 Subject: [PATCH] use standard function for decoding to unicode git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2746 fd906abe-77d9-0310-91a1-e0d9ade77398 --- resource.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource.py b/resource.py index b68e48c..ca711a6 100644 --- a/resource.py +++ b/resource.py @@ -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