<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Python, the text editor, and encoding</title>
	<atom:link href="http://www.xsi-blog.com/archives/111/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xsi-blog.com/archives/111</link>
	<description>People and thoughts behind XSI in production...</description>
	<pubDate>Fri, 21 Nov 2008 06:34:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: diego nunes</title>
		<link>http://www.xsi-blog.com/archives/111#comment-17349</link>
		<dc:creator>diego nunes</dc:creator>
		<pubDate>Wed, 22 Oct 2008 16:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-17349</guid>
		<description>. . Don't blame poor SciTE. It's my editor of choice since ever. The problem is that you're using non-ascii string in a Python source code without saying that to the compiler. PEP 263 (http://www.python.org/dev/peps/pep-0263) says you have a lot of options to do that (I, personally, like to use the second suggestes option).
. . As Python is really cool to newbies, if you save your file as UTF-8 with BOM, Python will automatically understand that he's dealing with UTF-8 encoding and treat the strings properly. If you change the encoding in SciTE to "UTF-8 with BOM" or simply declare you encoding explicitly, you won't have any problems.</description>
		<content:encoded><![CDATA[<p>. . Don&#8217;t blame poor SciTE. It&#8217;s my editor of choice since ever. The problem is that you&#8217;re using non-ascii string in a Python source code without saying that to the compiler. PEP 263 (http://www.python.org/dev/peps/pep-0263) says you have a lot of options to do that (I, personally, like to use the second suggestes option).<br />
. . As Python is really cool to newbies, if you save your file as UTF-8 with BOM, Python will automatically understand that he&#8217;s dealing with UTF-8 encoding and treat the strings properly. If you change the encoding in SciTE to &#8220;UTF-8 with BOM&#8221; or simply declare you encoding explicitly, you won&#8217;t have any problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ekeko</title>
		<link>http://www.xsi-blog.com/archives/111#comment-15340</link>
		<dc:creator>ekeko</dc:creator>
		<pubDate>Wed, 23 May 2007 11:21:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-15340</guid>
		<description>Hi:
going straight to the problem and not losing myself in nonsense comments:

did you try with (encoding example):

# -*- coding: iso-8859-1 -*- 

at the very first line of the file?
check your &#124;python-dir]\Lib\encodings\string_escape.py for a running example</description>
		<content:encoded><![CDATA[<p>Hi:<br />
going straight to the problem and not losing myself in nonsense comments:</p>
<p>did you try with (encoding example):</p>
<p># -*- coding: iso-8859-1 -*- </p>
<p>at the very first line of the file?<br />
check your |python-dir]\Lib\encodings\string_escape.py for a running example</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luc-Eric</title>
		<link>http://www.xsi-blog.com/archives/111#comment-5741</link>
		<dc:creator>Luc-Eric</dc:creator>
		<pubDate>Wed, 30 Aug 2006 19:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-5741</guid>
		<description>It because the file was saved as a unicode text file.
the first bytes of a unicode text file are : 0xFF 0xFE,
this is how editors like notepad know that the file isn''t ASCII</description>
		<content:encoded><![CDATA[<p>It because the file was saved as a unicode text file.<br />
the first bytes of a unicode text file are : 0xFF 0xFE,<br />
this is how editors like notepad know that the file isn&#8221;t ASCII</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniele Niero</title>
		<link>http://www.xsi-blog.com/archives/111#comment-5724</link>
		<dc:creator>Daniele Niero</dc:creator>
		<pubDate>Tue, 29 Aug 2006 14:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-5724</guid>
		<description>Yes! I have missed the real problem :) It doesn''t have to do with what I said :) 
Sorry Bernard.
But now I''m very curios about that, and I tried to replicate the problem without any luck (apparently I still missing what exactly is). Can you post a simple code that generate this kind of error?

Cheers,
Daniele</description>
		<content:encoded><![CDATA[<p>Yes! I have missed the real problem :) It doesn&#8221;t have to do with what I said :)<br />
Sorry Bernard.<br />
But now I&#8221;m very curios about that, and I tried to replicate the problem without any luck (apparently I still missing what exactly is). Can you post a simple code that generate this kind of error?</p>
<p>Cheers,<br />
Daniele</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniele Niero</title>
		<link>http://www.xsi-blog.com/archives/111#comment-5723</link>
		<dc:creator>Daniele Niero</dc:creator>
		<pubDate>Tue, 29 Aug 2006 14:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-5723</guid>
		<description>Maybe I missed the real problem, but it looks like an indentation problem. Different encoding = different way to indent the words... or am I wrong? since the indentation is part of the syntax, python is particularly expose to this kind of problem. This was my point... :)</description>
		<content:encoded><![CDATA[<p>Maybe I missed the real problem, but it looks like an indentation problem. Different encoding = different way to indent the words&#8230; or am I wrong? since the indentation is part of the syntax, python is particularly expose to this kind of problem. This was my point&#8230; :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernard Lebel</title>
		<link>http://www.xsi-blog.com/archives/111#comment-5720</link>
		<dc:creator>Bernard Lebel</dc:creator>
		<pubDate>Tue, 29 Aug 2006 11:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-5720</guid>
		<description>I don''t see what the syntax has to do with the encoding or the problem I have reported. But thanks for the suggestions.


Bernard</description>
		<content:encoded><![CDATA[<p>I don&#8221;t see what the syntax has to do with the encoding or the problem I have reported. But thanks for the suggestions.</p>
<p>Bernard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniele Niero</title>
		<link>http://www.xsi-blog.com/archives/111#comment-5715</link>
		<dc:creator>Daniele Niero</dc:creator>
		<pubDate>Tue, 29 Aug 2006 09:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=111#comment-5715</guid>
		<description>Yes, this is a common problem with python. Personally I consider python a tool with very nice features, but with an horrible syntax. The "indent part of the syntax" approach instead using the most common brackets expose our code to this type of stupid syntax error. So is necessary using a good ide when coding in python. I suggest Komodo (commercial) or Eclipse with PyDev extensions.</description>
		<content:encoded><![CDATA[<p>Yes, this is a common problem with python. Personally I consider python a tool with very nice features, but with an horrible syntax. The &#8220;indent part of the syntax&#8221; approach instead using the most common brackets expose our code to this type of stupid syntax error. So is necessary using a good ide when coding in python. I suggest Komodo (commercial) or Eclipse with PyDev extensions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
