<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.10.3">
</HEAD>
<BODY>
Le mercredi 06 septembre 2006 à 06:54 -0400, Stephan Richter a écrit :
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On Tuesday 05 September 2006 11:10, Christophe Combelles wrote:</FONT>
<FONT COLOR="#000000">> 2) utf-8 error in i18nfile</FONT>
<FONT COLOR="#000000">> --------------------------</FONT>
<FONT COLOR="#000000">> Why do I always get an error when I try to add some utf-8 text into an</FONT>
<FONT COLOR="#000000">> i18nfile? I just add an i18nfile in the ZMI, then I chose a name and I set</FONT>
<FONT COLOR="#000000">> the contentType to "text/plain;charset=utf-8". If I enter some text with</FONT>
<FONT COLOR="#000000">> accents like "éàôî", I get a system error which says : UnicodeDecodeError:</FONT>
<FONT COLOR="#000000">> 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in</FONT>
<FONT COLOR="#000000">> range(128).</FONT>
<FONT COLOR="#000000">> I don't get any error with a simple File object.</FONT>
<FONT COLOR="#000000">Okay, I18n file is a demo that is probably not well-developed. Don't use it. I </FONT>
<FONT COLOR="#000000">will propose to not distribute it anymore. Noone is using it, so you are on </FONT>
<FONT COLOR="#000000">your own finding the problem and providing a patch.</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
I had the same problem in my french site where we use many accentuated characters.<BR>
The solution I use until now is just to switch my Python interpreter to use "UTF-8" as default encoding, via the "site.py" file of my Python distribution...<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
Thierry
</TD>
</TR>
</TABLE>
</BODY>
</HTML>