<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>controlz</title>
	<atom:link href="https://controlz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://controlz.wordpress.com</link>
	<description>alter ego for my blog in Spanish http://formatinternet.wordpress.com ...please wait (34% formatted already)...</description>
	<lastBuildDate>Fri, 09 Nov 2007 20:19:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<site xmlns="com-wordpress:feed-additions:1">513856</site><cloud domain='controlz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s2.wp.com/i/webclip.png</url>
		<title>controlz</title>
		<link>https://controlz.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://controlz.wordpress.com/osd.xml" title="controlz" />
	<atom:link rel='hub' href='https://controlz.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Ruby on Rails at SIMO 2007</title>
		<link>https://controlz.wordpress.com/2007/10/31/ruby-on-rails-en-simo-2007/</link>
					<comments>https://controlz.wordpress.com/2007/10/31/ruby-on-rails-en-simo-2007/#comments</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Wed, 31 Oct 2007 20:19:01 +0000</pubDate>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[internet]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2007/10/31/ruby-on-rails-en-simo-2007/</guid>

					<description><![CDATA[Next tuesday I will be at SIMO in Madrid as a part of the frameworks roundtable. I&#8217;ll talk about why we use Ruby on Rails in ASPgems as our favorite development tool. At the same table, experts in Drupal, Code Igniter, Zend Framework, Sun J2EE and .Net will explain the reasons of their choice. It [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Next tuesday I will be at SIMO in Madrid as a part of the <a href="http://www.youlivek.com/ponenciask/show_conference/24">frameworks roundtable</a>.</p>
<p>I&#8217;ll talk about why we use Ruby on Rails in ASPgems as our favorite development tool. At the same table, experts in Drupal, Code Igniter, Zend Framework, Sun J2EE and .Net will explain the reasons of their choice. It will be an interesting session and I&#8217;m sure we will find several points in common between the different frameworks enforcing the idea that development paradigms are changing.</p>
<p>Another member of ASPgems, Agustín, will have a session on <a href="http://www.youlivek.com/ponenciask/show_conference/12">Ruby On Rails</a> the next day. </p>
<p>I find exciting this new orientation of SIMO, providing with technical content apart of the software products that get presented every year. </p>
<p>It&#8217;s good for the fair to take this step further and it&#8217;s good for us to be able to expose our point of view about new techniques in software development that will allow to get closer to the reality of web development, in contrast with the rigid architectures and procedures which have been leading the software industry for so long.</p>
<p>searchwords: simo, conference, ruby on rails, frameworks, comparative</p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2007/10/31/ruby-on-rails-en-simo-2007/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">32</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>RadRails 0.9.1</title>
		<link>https://controlz.wordpress.com/2007/10/27/radrails-091/</link>
					<comments>https://controlz.wordpress.com/2007/10/27/radrails-091/#comments</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Sat, 27 Oct 2007 17:24:37 +0000</pubDate>
				<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[radrails]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2007/10/27/radrails-091/</guid>

					<description><![CDATA[After a previous beta of RadRails working only under eclipse 3.2, there is finally a new version,0.9.1, working in Eclipse Europa (In 3.3 everything seems fine, I still didn&#8217;t have the time for trying on 3.4). The url for Eclipse&#8217;s update manager is http://update.aptana.com/update/rails/beta/3.2 If you are still not using any IDE for your Ruby [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>After a previous beta of <a href="http://www.radrails.org/">RadRails</a> working only under eclipse 3.2, there is finally a new version,0.9.1, working in <a href="http://www.eclipse.org/europa/">Eclipse Europa </a> (In 3.3 everything seems fine, I still didn&#8217;t have the time for trying on 3.4).</p>
<p>The url for Eclipse&#8217;s update manager is <a href="http://update.aptana.com/update/rails/beta/3.2" rel="nofollow">http://update.aptana.com/update/rails/beta/3.2</a></p>
<p>If you are still not using any IDE for your Ruby on Rails development, I would recommend to take a look at RadRails. Even if Eclipse is a bit heavy, in a modern computer that shouldn&#8217;t be a problem. My typical set of running applications when developing is Eclipse 3.3 with RadRails, one or two Mysql instances, FireFox, Thunderbird, Pidgin, Winamp, Notepad++, Console2, Kerio PF and AVG. Very often I have Skype, Emule and OpenOffice started too and even some IE for UI testing purposes. And of course all the ordinary services windows XP needs.</p>
<p>All of the above runs in a vanilla laptop with 2 Gigas of RAM bought over a year ago. Well, I can say everything works smoothly. My previous laptop was fairly old (over 4 years) and had &#8220;only&#8221; one giga. In that box sometimes I could feel Eclipse/RadRails were heavier than I would like. But not anymore.</p>
<p>Of course there are other IDEs and I&#8217;m sure they have their own sweet spots, but so far I haven&#8217;t seem anything to make me think of changing. I use Eclipse because I&#8217;ve been working with it for Java development since years and I feel pretty comfortable, because it has an overwhelming amount of plugins for almost anything, because it&#8217;s Open Source and multiplatform, and because it supports development in many programming languages. I have used it professionally for writing Java, JavaScript, ASP, HTML, CSS, PHP, C++ and Ruby.</p>
<p>Some of my favorite features of Eclipse/RadRails are navigating between classes with a single click, searching for classes or resources comfortably, database and subversion integration, graphical debugging, Rails servers management, code refactoring and assistance when writing Ruby, HTML, CSS or JavaScript.</p>
<p>Apart of that, there are plenty of details that make my every day much easier than with a plain text editor and the command line, which I use less every day (and surprisingly not missing it&#8230; much)</p>
<p>Since we are here already and since I just delivered the fourth out of nine chapters, I think I can already announce I&#8217;ve been writing a book about RadRails during the last months.</p>
<p>Starting with a conversation at the rubyonrails-talk list I got the opportunity to write it and even if at the beginning I hesitated a bit because it would take much of my free time, I finally gave in to my curiosity about the process of writing a technical book. If anything goes as by the schedule, I should be finishing it by early 2008.</p>
<p>The likely title is &#8220;RoR Made Easy with Aptana Radrails&#8221; and the publishing house behind it is <a href="http://www.packtpub.com/">Packt Publishing</a></p>
<p>searchwords: RadRails, Aptana, Eclipse, PacktPublishing, javier ramirez, book</p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2007/10/27/radrails-091/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">31</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>There is no bad weather</title>
		<link>https://controlz.wordpress.com/2007/01/19/no-hay-mal-tiempo/</link>
					<comments>https://controlz.wordpress.com/2007/01/19/no-hay-mal-tiempo/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Fri, 19 Jan 2007 17:38:59 +0000</pubDate>
				<category><![CDATA[off topic]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2007/01/19/no-hay-mal-tiempo/</guid>

					<description><![CDATA[I have found at Seth&#8217;s this Swedish refrain There is no bad weather, just bad clothing. It&#8217;s one of those sentences if they are not true I should make everything in my hand for they to be.]]></description>
										<content:encoded><![CDATA[<p>I have found at <a href="http://sethgodin.typepad.com/seths_blog/2007/01/preparation.html" target="_blank">Seth&#8217;s</a> this Swedish refrain</p>
<blockquote><p>There is no bad weather, just bad clothing.</p></blockquote>
<p>It&#8217;s one of those sentences if they are not true I should make everything in my hand for they to be.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2007/01/19/no-hay-mal-tiempo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">22</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>Find in the current frame in Firefox</title>
		<link>https://controlz.wordpress.com/2007/01/14/buscar-en-el-frame-actual-en-firefox/</link>
					<comments>https://controlz.wordpress.com/2007/01/14/buscar-en-el-frame-actual-en-firefox/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Sun, 14 Jan 2007 12:10:26 +0000</pubDate>
				<category><![CDATA[development]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2007/01/14/buscar-en-el-frame-actual-en-firefox/</guid>

					<description><![CDATA[If you read (with Firefox) online doc like in http://api.rubyonrails.com or http://www.ruby-doc.org/core/ for sure you will have noticed Firefox built-in search could be smarter. When you want to search something, you usually want to find it in the current frame, but firefox will always start searching from the first frame of the page, so you [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you read (with Firefox) online doc like in <a href="http://api.rubyonrails.com">http://api.rubyonrails.com</a> or <a href="http://www.ruby-doc.org/core/">http://www.ruby-doc.org/core/</a> for sure you will have noticed Firefox built-in search could be smarter. When you want to search something, you usually want to find it in the current frame, but firefox will always start searching from the first frame of the page, so you get tired of hitting F3.</p>
<p>Well, there is this very useful FF extension to start the search from the last point where you clicked with your mouse. If you click inside a frame and you hit Ctrl+F, your search will start from that point. Really handy!</p>
<p>The url for this beauty is <a href="http://addons.mozilla.org/firefox/1075/">Find in Frame Hack</a></p>
<p><code>searchwords: Firefox, DevBoi, extensiones, documentación, ruby on rails, documentation, search in frame</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2007/01/14/buscar-en-el-frame-actual-en-firefox/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">20</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>Parsing malformed XML or HTML</title>
		<link>https://controlz.wordpress.com/2006/12/06/parsear-xml-o-html-mal-formado/</link>
					<comments>https://controlz.wordpress.com/2006/12/06/parsear-xml-o-html-mal-formado/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Wed, 06 Dec 2006 00:22:14 +0000</pubDate>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2006/12/06/parsear-xml-o-html-mal-formado/</guid>

					<description><![CDATA[If you need to parse malformed XML or HTML there are some interesting options in ruby / rails. One of my favorites is using htree I just used it for reading HTML from a web, and convert it to XML automatically closing any open stand-alone tags like &#60;br&#62;, or forgotten open pairs like &#60;span&#62; or [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you need to parse malformed XML or HTML there are some interesting options in ruby / rails. One of my favorites is using <a href="http://raa.ruby-lang.org/project/htree/">htree</a></p>
<p>I just used it for reading HTML from a web, and convert it to XML automatically closing any open stand-alone tags like  &lt;br&gt;, or forgotten open pairs like &lt;span&gt; or &lt;tr&gt;. Then I can access the HTML directly as I would use an XML and even using XPATH.</p>
<p>Example in a real-life script</p>
<pre class="brush: ruby; title: ; notranslate">
require &#039;open-uri&#039;
require &#039;htree&#039;

#First I will get the contents from a web page
str_xml = &#039;&#039;
open(&quot;http://formatinternet.wordpress.com&quot;,  &#039;User-Agent&#039;=&amp;gt;&quot;Ruby/#{RUBY_VERSION}&quot;)
  { |file| str_xml = file.read }

#now we parse with HTree so we will get a valid XHTML accessible through a rexml document.
parsed_xml = HTree.parse(str_xml).to_rexml
#and now we can get all the div inside the html
a_divs = parsed_xml.elements.to_a(&#039;//div&#039;)
</pre>
<p><code>searchwords: malformed XML, malformed HTML, parser, htree</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2006/12/06/parsear-xml-o-html-mal-formado/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">18</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>XML and Rails as an integration tool</title>
		<link>https://controlz.wordpress.com/2006/12/04/xml-y-rails-como-herramienta-de-integracion/</link>
					<comments>https://controlz.wordpress.com/2006/12/04/xml-y-rails-como-herramienta-de-integracion/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Mon, 04 Dec 2006 12:43:42 +0000</pubDate>
				<category><![CDATA[conferenciarails2006]]></category>
		<category><![CDATA[conferencias]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2006/12/04/xml-y-rails-como-herramienta-de-integracion/</guid>

					<description><![CDATA[If you want to download the material about my session on Rails and XML I presented at conferencia rails, you can do so at the downloads page You can also watch it online here searchwords: XML, REXML, SimpleXML, to_xml, rxml, xml builder, SAX, STAX, push parser, pull parser, DOM]]></description>
										<content:encoded><![CDATA[<p>If you want to download the material about my session on Rails and XML I presented at <a href="http://2006.conferenciarails.org" target="_blank">conferencia rails</a>, you can do so at the <a href="https://controlz.wordpress.com/downloads/" target="_blank">downloads page</a></p>
<p>You can also watch it online <a href="http://slideshare.net/supercoco9/xml-on-rails/1" target="_blank">here</a></p>
<p><code>searchwords: XML, REXML, SimpleXML, to_xml, rxml, xml builder, SAX, STAX, push parser, pull parser, DOM</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2006/12/04/xml-y-rails-como-herramienta-de-integracion/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">15</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>rails,ajax,charset (ii)</title>
		<link>https://controlz.wordpress.com/2006/12/03/railsajaxcharset-ii/</link>
					<comments>https://controlz.wordpress.com/2006/12/03/railsajaxcharset-ii/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Sun, 03 Dec 2006 18:13:57 +0000</pubDate>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2006/12/03/railsajaxcharset-ii/</guid>

					<description><![CDATA[As we saw here when we use ajax and rails we have to be careful when using something other than UTF-8. We have already solved hoy to correctly display the information coming from the server, but we still have to see how to send it back properly. When we use rails helpers, the information submitted [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>As we saw <a href="https://controlz.wordpress.com/2006/11/04/railsajaxcharset-i/" target="_blank">here</a> when we use ajax and rails we have to be careful when using something other than UTF-8. We have already solved hoy to correctly display the information coming from the server, but we still have to see how to send it back properly.</p>
<p>When we use rails helpers, the information submitted via ajax is serialized by using the &#8220;serialize&#8221; function in prototype.js. This function makes a call to the standard javascript function &#8220;encodeURIComponent&#8221;.  Finally, this function makes an encoding by converting from the original charset of the page to UTF-8 and then escaping the characters.</span></p>
<p>As a result, any ajax call we are making through prototype.js will reach the server with the params in UTF-8. Once we know this, the way to deal with this is just converting each of the params to our desired target encoding. For doing this, we can use <a href="http://www.ruby-doc.org/core/classes/Iconv.html" target="_blank">Iconv</a>.</p>
<p>If you want to avoid converting each param individually, we can just convert everything in the Rails params object. Of course we will run the conversion only when we are receiving a petition via ajax.</p>
<p>What I have made is defining a new method &#8216;iconv&#8217; for the Hash class (ruby rocks!). I will simply iterate the children of the hash and their children (suppose they support the iconv method), converting all the found strings to the target encoding. The code for this is</p>
<pre class="brush: ruby; title: ; notranslate">
class Hash
  #converts the encoding of all the values in the (can be nested) hash,by using iconv
  def iconv(c_to,c_from,obj_iconv=nil)
    obj_iconv = obj_iconv || Iconv.new(c_to,c_from )
    self.each do |key,value|
      next if value.blank?
      if value.is_a? String
        self[key] = obj_iconv.iconv(value)
      elsif value.respond_to? &#039;iconv&#039;
        self[key] = value.iconv(c_to,c_from,obj_iconv)
      end
    end
    return self
  end
end
</pre>
<p>This will convert all descendant (direct or nor) strings in a Hash. That will be usually everything you need, but should you need to define the same functionality for Arrays or other collections it would be trivial to re-open those classes and adding an &#8216;iconv&#8217; method just like the one above.</p>
<p>Now everything we need is definind a filter for our actions in which all we will write is</p>
<pre class="brush: ruby; title: ; notranslate">
  params.iconv(&#039;iso-8859-1&#039;,&#039;utf-8&#039;) if request.xhr?
</pre>
<p>&#8230;and they coded in their own language happily ever after</p>
<p><code>searchwords: charset, utf-8, iso-8859-1, iconv, prototype.js, javascript, encodeURIComponent, ajax</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2006/12/03/railsajaxcharset-ii/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>rails,ajax,charset (i)</title>
		<link>https://controlz.wordpress.com/2006/11/04/railsajaxcharset-i/</link>
					<comments>https://controlz.wordpress.com/2006/11/04/railsajaxcharset-i/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Sat, 04 Nov 2006 11:38:17 +0000</pubDate>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2006/11/04/railsajaxcharset-i/</guid>

					<description><![CDATA[Those programming in non-English languages are used not to have available by default our charset and to work a little extra for everything to work fine. Rails makes easy to work with UTF-8, but sometimes you just need to work against a legacy database and UTF-8 is not an option. In Rails, if we want [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Those programming in non-English languages are used not to have available by default our charset and to work a little extra for everything to work fine.</p>
<p>Rails makes easy to work with UTF-8, but sometimes you just need to work against a legacy database and UTF-8 is not an option. In Rails, if we want to use ISO-8859-1 we can do so by stating the charset in our html code (in the layout) and by adding a controller filter such as</p>
<pre class="brush: ruby; title: ; notranslate">
def set_charset
  @headers[&#039;Content-Type&#039;] = &quot;text/html; charset=ISO-8859-1&quot;  unless request.xhr?
end
</pre>
<p>The reason for the unless condition is because if we try to set a content-type of html to an ajax response we will get an error.</p>
<p>If we try this in our application, everything will look fine. No more strange characters and apparently everything is going fine&#8230; untill we happen to use ajax.</p>
<p>As I said before, in an ajax response we cannot set html as the content-type; but if we don&#8217;t state any type, the browser will just use the default one, so we will be getting strange chars again.</p>
<p>The solution? Just use a content-type of  &#8220;text/javascript&#8221; with the right encoding in your ajax responses. This will tell the browser to treat the response as a javascript with the desired charset.</p>
<p>The modified controller for having a working encoding both for ajax and non-ajax responses would be:</p>
<pre class="brush: ruby; title: ; notranslate">
def set_charset
  str_type = request.xhr? ? &#039;javascript&#039; : &#039;html&#039;
  @headers[&#039;Content-Type&#039;] = &quot;text/#{str_type}; charset=ISO-8859-1&quot;
end
</pre>
<p>Now we can see all our content, either direct http or through ajax with the right encoding.</p>
<p>&#8230; the bad news will come if we want to use ajax for sending content back to the server&#8230; but don&#8217;t worry too much because I&#8217;ll tell you how to fix it in another post.</p>
<p><code>searchwords: charset, utf-8, iso-8859-1, iconv, prototype.js, javascript, encodeURIComponent, ajax</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2006/11/04/railsajaxcharset-i/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>Strange bed partners</title>
		<link>https://controlz.wordpress.com/2006/11/01/extranos-companeros-de-cama/</link>
					<comments>https://controlz.wordpress.com/2006/11/01/extranos-companeros-de-cama/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Wed, 01 Nov 2006 00:14:15 +0000</pubDate>
				<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[internet]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2006/11/01/extranos-companeros-de-cama/</guid>

					<description><![CDATA[Microsoft announces they will cooperate with Zend for integrating IIS and PHP. An external dynamic language with open source tradition running on top of one of the worst-famed companies for closing out their sources and ignoring standards? Interesting times&#8230; On the other side, Sun took positions some weeks ago by hiring the development team of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Microsoft <a href="http://www.microsoft.com/presspass/press/2006/oct06/10-31MSZendPR.mspx" target="_blank">announces</a> they will cooperate with <a href="http://www.zend.com" target="_blank">Zend</a> for integrating IIS and PHP. An external dynamic language with open source tradition running on top of one of the worst-famed companies for closing out their sources and ignoring standards? Interesting times&#8230;</p>
<p>On the other side, <a href="http://www.sun.com" target="_blank">Sun </a> took positions some weeks ago by <a href="http://headius.blogspot.com/2006/09/jruby-steps-into-sun.html" target="_blank">hiring</a> the development team of <a href="http://jruby.codehaus.org/" target="_blank">JRuby </a> and focusing towards Java and <a href="http://www.ruby-lang.org" target="_blank">ruby</a>/<a href="http://www.rubyonrails.org/" target="_blank">rails </a> speaking in a natural way.</p>
<p>Clearly <a href="http://en.wikipedia.org/wiki/Dynamic_language" target="_blank">dynamic languages</a> have a lot to say and they are going to hold an important role in the next ego-wars between the big companues&#8230; with a bit of luck maybe we&#8217;ll all win something</p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2006/11/01/extranos-companeros-de-cama/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
		<item>
		<title>First Conferencia Rails Hispana</title>
		<link>https://controlz.wordpress.com/2006/10/29/primera-conferencia-rails-hispana/</link>
					<comments>https://controlz.wordpress.com/2006/10/29/primera-conferencia-rails-hispana/#respond</comments>
		
		<dc:creator><![CDATA[javier ramirez]]></dc:creator>
		<pubDate>Sun, 29 Oct 2006 16:05:23 +0000</pubDate>
				<category><![CDATA[conferenciarails]]></category>
		<category><![CDATA[conferenciarails2006]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<guid isPermaLink="false">http://controlz.wordpress.com/2006/10/29/primera-conferencia-rails-hispana/</guid>

					<description><![CDATA[I&#8217;m a part of the group of professionals organizing the 1st Conferencia Rails Hispana about Ruby on Rails. It will be held in Madrid, at the facilities of DIT during November 24th y 25th. As you probably know, Ruby on Rails is one of the most exciting web-oriented development platforms. With about 30 sessions and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m a part of the group of professionals organizing the <a href="http://2006.conferenciarails.org" target="_blank">1st Conferencia Rails Hispana</a> about <a href="http://www.rubyonrails.org" target="_blank">Ruby on Rails</a>. It will be held in Madrid, at the facilities of <a href="http://www.dit.upm.es/travelinfo.html" target="_blank">DIT</a> during November 24th y 25th.</p>
<p>As you probably know, Ruby on Rails is one of the most exciting web-oriented development platforms.</p>
<p>With about 30 sessions and some parallel activities, this conference is a perfect starting point for an initial contact with this technology and a meeting point between professionals in the Spanish-speaking Rails community.</p>
<p>We will be live streaming all the sessions in the main hall and we&#8217;ll be having a remote Q&amp;A session with David Heinemeier Hansson</p>
<p>The official website is <a href="http://2006.conferenciarails.org/" target="_blank">http://2006.conferenciarails.org/</a> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://controlz.wordpress.com/2006/10/29/primera-conferencia-rails-hispana/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5</post-id>
		<media:content url="https://2.gravatar.com/avatar/e5cc1ef7c7b59e872abc6b8ee9874d5f84d9e78e0686c66dd443d5f535a08e0b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">jramirez</media:title>
		</media:content>
	</item>
	</channel>
</rss>
