<?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>Ian Winter &#187; charsets</title>
	<atom:link href="http://ianwinter.co.uk/tag/charsets/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianwinter.co.uk</link>
	<description>Have you found the instructions yet?</description>
	<lastBuildDate>Wed, 14 Sep 2011 22:16:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MySQL and 0x0B</title>
		<link>http://ianwinter.co.uk/2010/04/23/mysql-and-0x0b/</link>
		<comments>http://ianwinter.co.uk/2010/04/23/mysql-and-0x0b/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 11:01:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[charsets]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1125</guid>
		<description><![CDATA[You may or may not know about the wonderful vertical tab character 0x0B. It&#8217;s a character that&#8217;s not easy to see and can cause issues across a number of different programming languages. In my case a Rails developer was having trouble passing some data from an API. A JSON parser was throwing errors about a [...]]]></description>
			<content:encoded><![CDATA[<p>You may or may not know about the wonderful vertical tab character 0x0B. It&#8217;s a character that&#8217;s not easy to see and can cause issues across a number of different programming languages. In my case a Rails developer was having trouble passing some data from an API. A JSON parser was throwing errors about a specific character. Originally we suspected line breaks were causing the issue but after more digging and examination using Textmate and the Text bundle we spotted the invisible characters and having converted it to hex found out it was 0x0B. A quick Google brings back quite a few results of people having the same problem.</p>
<p>In order to find them in the database I knocked up the following SQL:</p>
<pre class="brush: sql; light: true; title: ; notranslate">SELECT * FROM table WHERE data LIKE CONCAT('%',CHAR(0x0B),'%');</pre>
<p>Then to replace them quickly (assuming the 3 records have ID&#8217;s 1,2 and 3):</p>
<pre class="brush: sql; light: true; title: ; notranslate">UPDATE table SET data = REPLACE(data,CHAR(0x0B),'') WHERE id IN (1,2,3);</pre>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/04/23/mysql-and-0x0b/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

