Warning: Cannot modify header information - headers already sent by (output started at /home/jdobbels/www/blog/inc/config.php:40) in /home/jdobbels/www/blog/inc/clearbricks/common/lib.http.php on line 222

Warning: Cannot modify header information - headers already sent by (output started at /home/jdobbels/www/blog/inc/config.php:40) in /home/jdobbels/www/blog/inc/clearbricks/common/lib.http.php on line 224

Warning: Cannot modify header information - headers already sent by (output started at /home/jdobbels/www/blog/inc/config.php:40) in /home/jdobbels/www/blog/inc/public/lib.urlhandlers.php on line 65

Warning: Cannot modify header information - headers already sent by (output started at /home/jdobbels/www/blog/inc/config.php:40) in /home/jdobbels/www/blog/inc/clearbricks/common/lib.http.php on line 247
JDobbelstein.dev() - Tag - unicode To infinity, and beyond ! 2011-01-10T00:04:33+01:00 Johan urn:md5:98d5e93307cb5ee6e20feba0dc3f35eb Dotclear Unicode in Python and i18n in Fedora urn:md5:523556271f859ae6173ca52b488da185 2010-08-10T13:45:00+02:00 Johan Now geeking ... fedorai18npythonrantunicode <!-- vim:spell:spelllang=en: Note that the article title is missing. It is managed directly by DotClear2. - - - - - - - - - - - - - - - - - Insert below a short introduction ================================= --> <p>When I was playing with the ports4dotclear system (see the previous post about it), I had to fix a number of Unicode handling errors in both Python and Perl. For those of you who do not know what is <a href="http://www.unicode.org/">Unicode</a>, it's the technology which allows me to write this kind of stuff: <em>«æ€¶ŧ←»® or «你好世界»</em>.</p> <p>I was forced to use Unicode because, well, XML-RPC communications are in XML and thus require the content to be encoded in UTF-8 (a Unicode encoding/decoding charset).</p> <p>All this mess leads me to this conclusion : <em>Unicode sucks in Python 2.x ! (and Fedora i18n has still some strange artifacts)</em></p> <p>I. Python There is a well known unicode bug in Python 2.x. It's really a shame it didn't got fix earlier, although I may have read the new python 3k fixed it. Anyway, this bug pops when you play with POSIX pipes and wide characters. It's very annoying because you don't understand why a simple shell redirection (on stdout) should change the python... <em><a href="http://www.jdobbelstein.eu/blog/post/2010/08/10/Unicode-in-Python-and-i18n-in-Fedora">Read</em> Unicode in Python and i18n in Fedora</a></p>