<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: shut up, you dummy 7-bit Python</title>
	<link>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/</link>
	<description>advocating olpa's open source developments</description>
	<pubDate>Sat, 11 Feb 2012 09:43:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: olpa</title>
		<link>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-15663</link>
		<dc:creator>olpa</dc:creator>
		<pubDate>Tue, 25 Jan 2011 05:23:33 +0000</pubDate>
		<guid>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-15663</guid>
		<description>I have no experience with Django, but the first idea is that the utf8-initialization code should be performed at Django startup. How? I have no idea.

The second idea is that Django unlikely uses stdin/stdout operations, but instead creates some intermediate objects. Maybe there is an option how to create such objects.</description>
		<content:encoded><![CDATA[<p>I have no experience with Django, but the first idea is that the utf8-initialization code should be performed at Django startup. How? I have no idea.</p>
<p>The second idea is that Django unlikely uses stdin/stdout operations, but instead creates some intermediate objects. Maybe there is an option how to create such objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: individuo7</title>
		<link>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-15662</link>
		<dc:creator>individuo7</dc:creator>
		<pubDate>Mon, 24 Jan 2011 03:20:02 +0000</pubDate>
		<guid>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-15662</guid>
		<description>Thanks just what I needed... My program ran fine but the Django tests gave me an UnicodeDecodeError</description>
		<content:encoded><![CDATA[<p>Thanks just what I needed&#8230; My program ran fine but the Django tests gave me an UnicodeDecodeError</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olpa, OSS developer &#187; Blog Archive &#187; python, re-encoding incorrected encoded string</title>
		<link>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-8694</link>
		<dc:creator>olpa, OSS developer &#187; Blog Archive &#187; python, re-encoding incorrected encoded string</dc:creator>
		<pubDate>Fri, 17 Aug 2007 11:02:10 +0000</pubDate>
		<guid>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-8694</guid>
		<description>[...] See also: shut up, you dummy 7-bit Python. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] See also: shut up, you dummy 7-bit Python. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zgoda</title>
		<link>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-8262</link>
		<dc:creator>zgoda</dc:creator>
		<pubDate>Thu, 29 Mar 2007 13:13:33 +0000</pubDate>
		<guid>http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/#comment-8262</guid>
		<description>Yes, this is ugly hack.

If the problem is your "print" statement - fight it there, in the "print" statement, not at the system/platform level.

Just remember that your terminal is a file-like object, you cann't put unicode objects into it, only byte-encoded streams. If you happen to work with unicode objects, you have to encode it to byte stream before putting it into any file, socket or simply output somewhere outside your application. Python is not well suited for guessing required encoding, so it uses ASCII as default encoding - "when facing ambiguity, refuse to guess". You have to know the required encoding before producing output.</description>
		<content:encoded><![CDATA[<p>Yes, this is ugly hack.</p>
<p>If the problem is your &#8220;print&#8221; statement - fight it there, in the &#8220;print&#8221; statement, not at the system/platform level.</p>
<p>Just remember that your terminal is a file-like object, you cann&#8217;t put unicode objects into it, only byte-encoded streams. If you happen to work with unicode objects, you have to encode it to byte stream before putting it into any file, socket or simply output somewhere outside your application. Python is not well suited for guessing required encoding, so it uses ASCII as default encoding - &#8220;when facing ambiguity, refuse to guess&#8221;. You have to know the required encoding before producing output.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

