<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: UTF-8 in MySQL &#8212; Solving UTF-8 Issues in MySQL	</title>
	<atom:link href="https://www.farinspace.com/utf-8-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.farinspace.com/utf-8-in-mysql/</link>
	<description>Practical Real World Web Development</description>
	<lastBuildDate>Tue, 12 Nov 2013 16:27:52 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>
		By: Suresh V		</title>
		<link>https://www.farinspace.com/utf-8-in-mysql/#comment-21568</link>

		<dc:creator><![CDATA[Suresh V]]></dc:creator>
		<pubDate>Wed, 08 Feb 2012 17:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1558#comment-21568</guid>

					<description><![CDATA[Hi Dimas,

I tried quite a lot of things. Everything is working except this spanish character issue. The below is the first instance where I get the row data from Zend GData API.

$row=$Col-&#062;getText(); //getText is the Google API that returns the value in the row.
print &quot;$row&quot;; // I print the content

When I print it, it does not display the special characters properly.


I tried various different things such as edit the PHP file and add:

mbstring.language               = Neutral       ; Set default language to Neutral(UTF-8) (default)
mbstring.internal_encoding      = UTF-8         ; Set default internal encoding to UTF-8
mbstring.encoding_translation   = On            ;  HTTP input encoding translation is enabled
mbstring.http_input             = auto          ; Set HTTP input character set dectection to auto
mbstring.http_output            = UTF-8         ; Set HTTP output encoding to UTF-8
mbstring.detect_order           = auto          ; Set default character encoding detection order to auto
mbstring.substitute_character   = none          ; Do not print invalid characters
default_charset                 = UTF-8         ; Default character set for auto content type header
mbstring.func_overload  = 7 ; All non-multibyte-safe functions are overloaded with the mbstring alternatives

Add in the below in MySql

init_connect=&#039;SET collation_connection = utf8_unicode_ci; SET NAMES utf8;&#039;
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake

Change Database and Table properties

ALTER DATABASE db_name
	CHARACTER SET utf8
	DEFAULT CHARACTER SET utf8
	COLLATE utf8_general_ci
	DEFAULT COLLATE utf8_general_ci
	;

ALTER TABLE tbl_name
	DEFAULT CHARACTER SET utf8
	COLLATE utf8_general_ci
	;

Call SETNAMES etc just after mysql open connection.

$q=&quot;SET NAMES &#039;utf8&#039;&quot;;
$r=mysql_query($q);
mysql_query(&quot;SET CHARACTER SET utf8&quot;);

But nothing seems to work. I guess I have another frustrating day ahead of me.]]></description>
			<content:encoded><![CDATA[<p>Hi Dimas,</p>
<p>I tried quite a lot of things. Everything is working except this spanish character issue. The below is the first instance where I get the row data from Zend GData API.</p>
<p>$row=$Col-&gt;getText(); //getText is the Google API that returns the value in the row.<br />
print &#8220;$row&#8221;; // I print the content</p>
<p>When I print it, it does not display the special characters properly.</p>
<p>I tried various different things such as edit the PHP file and add:</p>
<p>mbstring.language               = Neutral       ; Set default language to Neutral(UTF-8) (default)<br />
mbstring.internal_encoding      = UTF-8         ; Set default internal encoding to UTF-8<br />
mbstring.encoding_translation   = On            ;  HTTP input encoding translation is enabled<br />
mbstring.http_input             = auto          ; Set HTTP input character set dectection to auto<br />
mbstring.http_output            = UTF-8         ; Set HTTP output encoding to UTF-8<br />
mbstring.detect_order           = auto          ; Set default character encoding detection order to auto<br />
mbstring.substitute_character   = none          ; Do not print invalid characters<br />
default_charset                 = UTF-8         ; Default character set for auto content type header<br />
mbstring.func_overload  = 7 ; All non-multibyte-safe functions are overloaded with the mbstring alternatives</p>
<p>Add in the below in MySql</p>
<p>init_connect=&#8217;SET collation_connection = utf8_unicode_ci; SET NAMES utf8;&#8217;<br />
character-set-server=utf8<br />
collation-server=utf8_unicode_ci<br />
skip-character-set-client-handshake</p>
<p>Change Database and Table properties</p>
<p>ALTER DATABASE db_name<br />
	CHARACTER SET utf8<br />
	DEFAULT CHARACTER SET utf8<br />
	COLLATE utf8_general_ci<br />
	DEFAULT COLLATE utf8_general_ci<br />
	;</p>
<p>ALTER TABLE tbl_name<br />
	DEFAULT CHARACTER SET utf8<br />
	COLLATE utf8_general_ci<br />
	;</p>
<p>Call SETNAMES etc just after mysql open connection.</p>
<p>$q=&#8221;SET NAMES &#8216;utf8&#8242;&#8221;;<br />
$r=mysql_query($q);<br />
mysql_query(&#8220;SET CHARACTER SET utf8&#8221;);</p>
<p>But nothing seems to work. I guess I have another frustrating day ahead of me.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dimas		</title>
		<link>https://www.farinspace.com/utf-8-in-mysql/#comment-21559</link>

		<dc:creator><![CDATA[Dimas]]></dc:creator>
		<pubDate>Wed, 08 Feb 2012 07:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1558#comment-21559</guid>

					<description><![CDATA[Try to track down where the bad conversion is happening (at which point in the process).]]></description>
			<content:encoded><![CDATA[<p>Try to track down where the bad conversion is happening (at which point in the process).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Suresh V		</title>
		<link>https://www.farinspace.com/utf-8-in-mysql/#comment-21553</link>

		<dc:creator><![CDATA[Suresh V]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 20:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1558#comment-21553</guid>

					<description><![CDATA[I am having some problem. Please help.The problem is that I use Google SpreadSheets PHP API(using the help of your article &quot;Saving Form Data to Google Spreadsheets Using PHP and the Google Docs API: &quot;) to get data from the sheets. Everything works fine. Except that my PHP script displays spanish characters incorrectly.


      $row=$Col-&#062;getText();
      print &quot;$row&quot;;

so something like ñer gets displayed as Ã±er.

when I try and put the data in MySql. Same problem. I have changed my php.ini file, mysql settings. Everything really. I can give details of the settings. But nothing seems to work for me.]]></description>
			<content:encoded><![CDATA[<p>I am having some problem. Please help.The problem is that I use Google SpreadSheets PHP API(using the help of your article &#8220;Saving Form Data to Google Spreadsheets Using PHP and the Google Docs API: &#8220;) to get data from the sheets. Everything works fine. Except that my PHP script displays spanish characters incorrectly.</p>
<p>      $row=$Col-&gt;getText();<br />
      print &#8220;$row&#8221;;</p>
<p>so something like ñer gets displayed as Ã±er.</p>
<p>when I try and put the data in MySql. Same problem. I have changed my php.ini file, mysql settings. Everything really. I can give details of the settings. But nothing seems to work for me.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
