<?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>Jontas &#187; charset</title>
	<atom:link href="http://www.f15ijp.com/tag/charset/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.f15ijp.com</link>
	<description>My digital notepad (notes etc)</description>
	<lastBuildDate>Wed, 28 Dec 2011 18:24:47 +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>Apache2 unseting AddDefaultCharset (via .htaccess)</title>
		<link>http://www.f15ijp.com/2010/07/27/apache2-unseting-adddefaultcharset-via-htaccess/</link>
		<comments>http://www.f15ijp.com/2010/07/27/apache2-unseting-adddefaultcharset-via-htaccess/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 11:19:35 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[AddDefaultCharset]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[encoding]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=561</guid>
		<description><![CDATA[Setting a default charset using .htaccess is a simple thing to do However sometimes there is a need to unset default charset as well (for instance if the AddDefaultCharset is set in the apache config and this is causing problems). This is very easy to do just edit the .htaccess file and add a line [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.f15ijp.com/2010/01/14/apache2-changing-charset-using-htaccess/">Setting a default charset using .htaccess is a simple thing to do</a></p>
<p>However sometimes there is a need to unset default charset as well (for instance if the AddDefaultCharset is set in the apache config and this is causing problems).</p>
<p>This is very easy to do just edit the .htaccess file and add a line that says</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">AddDefaultCharset</span> <span style="color: #0000ff;">OFF</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/07/27/apache2-unseting-adddefaultcharset-via-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML: UTF-8 encoding</title>
		<link>http://www.f15ijp.com/2010/07/14/html-utf-8-encoding/</link>
		<comments>http://www.f15ijp.com/2010/07/14/html-utf-8-encoding/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 13:10:23 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[utf-8]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=551</guid>
		<description><![CDATA[To get a html page to display UTF-8 encoded text correctly (without setting a default charset) simply add the following to the head of the html page. &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=UTF-8&#34; /&#62;]]></description>
			<content:encoded><![CDATA[<p>To get a html page to display UTF-8 encoded text correctly (without <a href="http://www.f15ijp.com/2010/01/14/apache2-changing-charset-using-htaccess/">setting a default charset</a>) simply add the following to the head of the html page.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/07/14/html-utf-8-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento: Send åäö (and other international characters) to DIBS</title>
		<link>http://www.f15ijp.com/2010/02/09/magento-send-aao-and-other-international-characters-to-dibs/</link>
		<comments>http://www.f15ijp.com/2010/02/09/magento-send-aao-and-other-international-characters-to-dibs/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 19:30:42 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[DIBS]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=331</guid>
		<description><![CDATA[If your store uses DIBS to manage payments, then the risk is that you have to worry about characters like åäö. What we had to do is to make the form post the data as ISO-8859-1. We did this by adding accept-charset=&#8221;iso-8859-1&#8243; to the forms that we send to DIBS. In &#8220;/app/design/frontend/default/blank/template/dibs/standard/redirect_paymentwindow.phtml&#8221; 56 &#60;form action=&#34;https://payment.architrade.com/paymentweb/start.action&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>If your store uses <a href="http://www.dibs.dk">DIBS</a> to manage payments, then the risk is that you have to worry about characters like åäö.</p>
<p>What we had to do is to make the form post the data as ISO-8859-1.<br />
We did this by adding accept-charset=&#8221;iso-8859-1&#8243; to the forms that we send to DIBS.</p>
<p>In &#8220;/app/design/frontend/default/blank/template/dibs/standard/redirect_paymentwindow.phtml&#8221;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>56
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>form action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;https://payment.architrade.com/paymentweb/start.action&quot;</span> method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;dibs&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;dibs&quot;</span> accept<span style="color: #339933;">-</span>charset<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;iso-8859-1&quot;</span><span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Once we had done this then the order details were shown correctly on the DIBS page (yes, the Chinese chars are just a test, I have no idea what it might say)<br />
<a href="http://f15ijp.com/wp-content/uploads/2010/02/DIBS-betalning_1265726332501.png"><img src="http://f15ijp.com/wp-content/uploads/2010/02/DIBS-betalning_1265726332501-300x289.png" alt="Details on DIBS including åäö" title="DIBS betalning" width="300" height="289" class="aligncenter size-medium wp-image-332" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/02/09/magento-send-aao-and-other-international-characters-to-dibs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Converting a file encoded in ISO-8859-1 to UTF-8</title>
		<link>http://www.f15ijp.com/2010/02/09/linux-converting-a-file-encoded-in-iso-8859-1-to-utf-8/</link>
		<comments>http://www.f15ijp.com/2010/02/09/linux-converting-a-file-encoded-in-iso-8859-1-to-utf-8/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 15:00:52 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=325</guid>
		<description><![CDATA[If you have a file that is saves as ISO-8859-1 (or ISO-LATIN-1 if you like to call it that) and wish to convert it to UTF-8 you can use: iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm &#62; ./newfile.html This will create a new file with the converted encoding. iconv can of of course convert to and from several [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a file that is saves as ISO-8859-1 (or ISO-LATIN-1 if you like to call it that) and wish to convert it to UTF-8 you can use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> iconv <span style="color: #660033;">--from-code</span>=ISO-<span style="color: #000000;">8859</span>-<span style="color: #000000;">1</span> <span style="color: #660033;">--to-code</span>=UTF-<span style="color: #000000;">8</span> .<span style="color: #000000; font-weight: bold;">/</span>oldfile.htm <span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>newfile.html</pre></div></div>

<p>This will create a new file with the converted encoding.</p>
<p>iconv can of of course convert to and from several other charsets. To see a list of all the encodings that iconv can work with use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> iconv <span style="color: #660033;">-l</span></pre></div></div>

<p>If you wish to massconvert files find can be used with exec</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.txt&quot;</span> <span style="color: #660033;">-exec</span> iconv <span style="color: #660033;">-f</span> ISO-<span style="color: #000000;">8859</span>-<span style="color: #000000;">1</span> <span style="color: #660033;">-t</span> UTF-<span style="color: #000000;">8</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #660033;">-o</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>.utf8 \;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/02/09/linux-converting-a-file-encoded-in-iso-8859-1-to-utf-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2 changing charset using .htaccess</title>
		<link>http://www.f15ijp.com/2010/01/14/apache2-changing-charset-using-htaccess/</link>
		<comments>http://www.f15ijp.com/2010/01/14/apache2-changing-charset-using-htaccess/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:05:07 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[AddDefaultCharset]]></category>
		<category><![CDATA[AddType]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[mime-type]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=145</guid>
		<description><![CDATA[If you do not wish to change character encoding for the entire server, but only one site (or only one directory) then this is possible to do using .htaccess. AddDefaultCharset UTF-8 If you only wish to do this to php or htm files (and not all files) &#60;FilesMatch &#34;\.(htm&#124;php)$&#34;&#62; AddDefaultCharset UTF-8 &#60;/FilesMatch&#62; If you wish [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not wish to change character encoding for the entire server, but only one site (or only one directory) then this is possible to do using .htaccess.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">AddDefaultCharset</span> UTF-<span style="color: #ff0000;">8</span></pre></div></div>

<p>If you only wish to do this to php or htm files (and not all files)</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">FilesMatch</span> <span style="color: #7f007f;">&quot;<span style="color: #000099; font-weight: bold;">\.</span>(htm|php)$&quot;</span>&gt;
<span style="color: #00007f;">AddDefaultCharset</span> UTF-<span style="color: #ff0000;">8</span>
&lt;/<span style="color: #000000; font-weight:bold;">FilesMatch</span>&gt;</pre></div></div>

<p>If you wish to modify the mime-type as well as the encoding (on html files in this example)</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">AddType</span> <span style="color: #7f007f;">'text/html; charset=UTF-8'</span> html</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/01/14/apache2-changing-charset-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

