<?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>Peter Hoeg&#187; rails</title>
	<atom:link href="http://www.hoeg.com/archives/tag/rails/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hoeg.com</link>
	<description>Who gives a blog?</description>
	<lastBuildDate>Thu, 12 Jan 2012 05:19:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PDF::Writer and Ruby on Rails</title>
		<link>http://www.hoeg.com/archives/35</link>
		<comments>http://www.hoeg.com/archives/35#comments</comments>
		<pubDate>Wed, 14 Jan 2009 16:25:25 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.hoeg.com/?p=35</guid>
		<description><![CDATA[Was struggling with an unbelievably annoying error, where PDF::Writer (or pdf-writer as it&#8217;s also called) simply refused to show special accented characters incl the Euro sign, but presented garbage instead. Turns out that as of pdf-writer 1.1.8, the following is the case: a) No, it doesn&#8217;t accept utf-16, despite what it claims b) Feeding it [...]]]></description>
			<content:encoded><![CDATA[<p>Was struggling with an unbelievably annoying error, where PDF::Writer (or pdf-writer as it&#8217;s also called) simply refused to show special accented characters incl the Euro sign, but presented garbage instead. Turns out that as of pdf-writer 1.1.8, the following is the case:</p>
<p>a) No, it doesn&#8217;t accept utf-16, despite what it claims<br />
b) Feeding it utf-8, will look fine for what can be mapped to 7bit ASCII<br />
c) Feeding it Win-1252 seems to do the trick, although some people claim it&#8217;s also hit and miss.</p>
<p>In your class doing the PDF generation, add a method like this:</p>
<pre>def to_pw(text = '')
  return Iconv.conv('win-1252', 'utf-8', text)
end</pre>
<p>And then call that to output all the text.</p>
<p>YMMV, but it worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hoeg.com/archives/35/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.333 seconds -->

