Hi Dieter,<br><br> That makes a lot of sense, thanks. Once I encode the strings in utf-8 there are no issues.<br><br> That's a great tip about setting the content_type charset correctly. The way I was handling this so far was to specify it in the header of the page that was displaying the text:<br>
<span tal:content="nocall:python:request.response.setHeader('Content-Type','text/html; charset=UTF-8')" tal:omit-tag=""></span><br><br> But setting the content type is a lot cleaner, so I'll be doing that from now on.<br>
<br> Thanks!<br><br>Thibaud<br><br>Also, in case anyone googles this... by default Zope renders content with a <br><br><div class="gmail_quote">On Mon, Dec 15, 2008 at 2:56 PM, Dieter Maurer <span dir="ltr"><<a href="mailto:dieter@handshake.de">dieter@handshake.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Andreas Jung wrote at 2008-12-14 16:00 +0100:<br>
<div><div></div><div class="Wj3C7c">>On 14.12.2008 15:44 Uhr, Thibaud Morel l'Horset wrote:<br>
>> Hey AJ,<br>
>><br>
>> Thanks. Full traceback below. Regarding storing files, I meant the File<br>
>> Zope Object, as added by the following API call:<br>
>> newFolder.manage_addFile(id,title=title, content_type="text/plain",<br>
>> file=content).<br>
>><br>
><br>
>'file' must be an open file object and not a string with the binary content.<br>
<br>
</div></div>Almost: "file" is either a file like object or an "str" but not "unicode".<br>
<br>
@Thibaud: encode your unicode to a byte sequence ("str")<br>
using an adequate encoding (e.g. 'utf-8').<br>
<br>
You should then also indicate the chosen charset in "content_type",<br>
e.g. "content_type='text/plain; charset=utf-8'".<br>
<br>
<br>
<br>
--<br>
<font color="#888888">Dieter<br>
</font></blockquote></div><br>