<?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>Turtlebite&#039;s Blog &#187; utf8</title>
	<atom:link href="http://blog.turtlebite.com/tag/utf8/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.turtlebite.com</link>
	<description>Flash CMS Framework, Fleb Framework, Global Navigation and other ActionScript Stuff</description>
	<lastBuildDate>Thu, 17 Nov 2011 06:01:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Flash CMS v4.71: Character Encoding Problems fixed</title>
		<link>http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/</link>
		<comments>http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 09:46:23 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Flash CMS]]></category>
		<category><![CDATA[character encoding]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://blog.flashcmsframework.com/?p=861</guid>
		<description><![CDATA[The issue with proper character encoding has been there for a while. Even though the database tables have &#8220;latin1&#8243; as the default character set, I knew this was not the correct solution. But it always worked for me, and I have been using &#8220;utf8_encode/utf8_decode&#8221; in my php scripts and all was fine. Even though I [...]]]></description>
			<content:encoded><![CDATA[<p>The issue with proper character encoding has been there for a while. Even though the database tables have &#8220;latin1&#8243; as the default character set, I knew this was not the correct solution. But it always worked for me, and I have been using &#8220;utf8_encode/utf8_decode&#8221; in my php scripts and all was fine. Even though I had to convert some single special characters like the bullet point (•), I could live with that workaround and I used to postpone the problem for ages&#8230; Until now. Because a site I&#8217;m working on will be in russian and german, and therefor I was confronted with a whole bunch of cyrillic characters&#8230; So I had to fix this once and for all.</p>
<p>The funny thing is, it is really simple if you know the right MySQL syntax you have to use. It is not done by setting the &#8220;Default Character Set&#8221; of  the database tables to &#8220;utf8&#8243;, which is what I have tried many times before. You have to add 2 more lines before the query.</p>
<p>In PHP, Instead of this:</p>
<pre class="brush: php;">
//......
$query = &quot;SELECT * FROM table&quot;;
$result = mysql_query($query);
//.....
</pre>
<p>&#8230;it should look like this:</p>
<pre class="brush: php;">
//......
$query = &quot;SELECT * FROM yourtable&quot;;
mysql_query(&quot;SET CHARACTER SET utf8&quot;);
mysql_query(&quot;SET NAMES utf8&quot;);
$result = mysql_query($query);
//.....
</pre>
<p>I know this may seem too obvious, but at the time I was trying to solve this I just didn&#8217;t find the solution. And as I said, I had a workaround that was fine for a long time.</p>
<p><strong>Another small improvement in version 4.71: skip crop/resize picture<br />
<span style="font-weight: normal;">I have added a checkbox in the upload section of the CMS, when you crop/resize a picture. It is now possible to skip the first cropping/resizing and therefor upload a picture &#8220;as is&#8221; (see the screenshot below). After that, you can still define the thumbnail. Why that? I have a client who is very keen on image quality. Even if I set the quality of imagemagic to 100%, the image quality loss was to big for the client, and even worse, the image became to large in file size. So now the client can prepare the image in photoshop, upload it as it is and just use the thumbnail functionality of the CMS to create the thumbnail, where quality does not matter that much.</span></strong></p>
<p><img class="alignnone size-full wp-image-864" title="flash-cms-skip-crop-resize-picture" src="http://blog.flashcmsframework.com/wp-content/uploads/2009/12/flash-cms-skip-crop-resize-picture.jpg" alt="flash-cms-skip-crop-resize-picture" width="595" height="250" /></p>
<p><a href="http://www.flashcmsframework.com/docs/doku.php?id=flash-cms-download">Download the Turtlebite Flash CMS here</a>.</p>
<p>Cheers,<br />
Christian</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;title=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;title=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;title=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed&amp;desc=The%20issue%20with%20proper%20character%20encoding%20has%20been%20there%20for%20a%20while.%20Even%20though%20the%20database%20tables%20have%20%22latin1%22%20as%20the%20default%20character%20set%2C%20I%20knew%20this%20was%20not%20the%20correct%20solution.%20But%20it%20always%20worked%20for%20me%2C%20and%20I%20have%20been%20using%20%22utf8_encode%2Futf8_decode%22%20in%20my%20php%20scripts%20and%20all%20was%20fine.%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;bm_description=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;title=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;title=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/&amp;title=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Flash+CMS+v4.71%3A+Character+Encoding+Problems+fixed+-+http://b2l.me/afqzjy&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.turtlebite.com/flash-cms-v4-71-character-encoding-problems-fixed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

