<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code That Matters &#187; unicode</title>
	<atom:link href="http://www.codethatmatters.com/tag/unicode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codethatmatters.com</link>
	<description>Pylons, rails, jQuery and other stuff that matters</description>
	<lastBuildDate>Sat, 16 Jul 2011 10:57:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unicode in Mako using Pylons</title>
		<link>http://www.codethatmatters.com/2009/10/unicode-in-mako-using-pylons/</link>
		<comments>http://www.codethatmatters.com/2009/10/unicode-in-mako-using-pylons/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 07:18:02 +0000</pubDate>
		<dc:creator>henke</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[mako]]></category>
		<category><![CDATA[pylons]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=72</guid>
		<description><![CDATA[Small post regarding unicode support in mako. I learned yesterday that mako not only has input and output encoding options but also an default_filter encoding. In the environment.py file, in your Pylons config folder, you need all these three to be sure that everything is enoded as unicode. Remember though that the default_filters argument can [...]]]></description>
			<content:encoded><![CDATA[<p>Small post regarding unicode support in mako. I learned yesterday that mako not only has input and output encoding options but also an default_filter encoding. In the environment.py file, in your Pylons config folder, you need all these three to be sure that everything is enoded as unicode. Remember though that the default_filters argument can have big impact on performance.</p>
<p><em>(If someone knows the configuration files for other frameworks, please write a comment about it and I&#8217;ll add it to the post)</em></p>
<p>Please read the Mako unicode chapter <a href="http://www.makotemplates.org/docs/unicode.html">here</a> if you want the gory details.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span class="co1">#environment.py</span>
 config<span class="br0">&#91;</span><span class="st0">'pylons.app_globals'</span><span class="br0">&#93;</span>.<span class="me1">mako_lookup</span> = TemplateLookup<span class="br0">&#40;</span>
        input_encoding=<span class="st0">'utf-8'</span>, 
        output_encoding=<span class="st0">'utf-8'</span>, 
        default_filters=<span class="br0">&#91;</span><span class="st0">'decode.utf8'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2009/10/unicode-in-mako-using-pylons/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

