This patch is not included and haven't received comments.<div>Any particular reason?</div><div>There are ported activities needing this change.</div><div><br></div><div>Gonzalo <br><br><div class="gmail_quote">On Mon, Aug 27, 2012 at 11:09 AM, <span dir="ltr"><<a href="mailto:godiard@sugarlabs.org" target="_blank">godiard@sugarlabs.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Gonzalo Odiard <<a href="mailto:godiard@gmail.com">godiard@gmail.com</a>><br>
<br>
As spoted by Daniel Narvaez in [1], pygi does not set the default encoding<br>
anymore as the old gtk did. This change break ported activities.<br>
The change in gtk was discussed upstream here [2]<br>
A better solution will be implemented when we port to python 3,<br>
when we will be able to use real unicode strings.<br>
<br>
Signed-off-by: Gonzalo Odiard <<a href="mailto:gonzalo@laptop.org">gonzalo@laptop.org</a>><br>
<br>
[1] <a href="http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038993.html" target="_blank">http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038993.html</a><br>
[2] <a href="https://bugzilla.gnome.org/show_bug.cgi?id=681915" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=681915</a><br>
---<br>
bin/sugar-activity | 5 +++++<br>
1 file changed, 5 insertions(+)<br>
<br>
diff --git a/bin/sugar-activity b/bin/sugar-activity<br>
index 5aef1ae..839174a 100644<br>
--- a/bin/sugar-activity<br>
+++ b/bin/sugar-activity<br>
@@ -18,6 +18,11 @@<br>
<br>
import os<br>
import sys<br>
+# Change the default encoding to avoid UnicodeDecodeError<br>
+# <a href="http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038928.html" target="_blank">http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038928.html</a><br>
+reload(sys)<br>
+sys.setdefaultencoding('utf-8')<br>
+<br>
import gettext<br>
from optparse import OptionParser<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.7.11.2<br>
<br>
</font></span></blockquote></div><br></div>