<?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, 06 Sep 2008 01:26:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<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>
