<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Codification issues"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Codification issues"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Codification issues</title>
				<description><![CDATA[ Hello,

I am having some issues with utf8 charset. I use mysql and php. PHPMyAdmin shows perfectly the name of the cities with special chars (vietnamese, iranian, arabic,..). Some of the special chars i can see it, but not all of them. In my header i have      
  <meta http-equiv=Content-Type content="text/html; charset=utf-8" />

I was thinking it was something to do with php, but phpmyadmin shows it properly with full special chars support. But in my script i can't make it work. I tried all strings functions, all things about strings convertion, but nothing through.

Anybody could help me?
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#713</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#713</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 11:13:35]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ i'm sorry i was not logged in.

That was me]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#714</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#714</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 11:15:38]]> GMT</pubDate>
				<author><![CDATA[ backbeat]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ When you do nothing special with PHP (e.g. multibyte)
it send strings to your website like they are found in the database.

Did you tried to tell the browser to use a special charset?
Does the browser use UTF-8?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#715</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#715</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 13:05:44]]> GMT</pubDate>
				<author><![CDATA[ noiv]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ Yes, the browser succesfully detects that the charset is utf8. THe fact is that some of the special chars are shown properly, but some others not. Is like if i had something missing to be able to show them all, which is weird as in phpmyadmin can be seen fine.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#716</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#716</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 13:37:34]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ Sorry i forgot to log me in again  :lol: ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#717</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#717</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 13:38:36]]> GMT</pubDate>
				<author><![CDATA[ backbeat]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ My remote diagnostics capabilities are limited, need more details to give help....]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#719</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#719</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 14:26:13]]> GMT</pubDate>
				<author><![CDATA[ noiv]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ I'm gonna show you some screenshots:

That is what i got in phpmyadmin
<img src="http://img50.imageshack.us/img50/7206/phpmydaminzv6.jpg" border="0">

which is fine, but same configuration, and with all utf8 treatments i got this

<img src="http://img104.imageshack.us/img104/6559/localhostxr7.jpg" border="0">

Doing the same query, same php and apache configuration and same browser config

That is what i mean]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#721</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#721</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 15:56:50]]> GMT</pubDate>
				<author><![CDATA[ backbeat]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ Well, I see. Same browser, same charset, but different results.
Which code produces bottom screen?
Have you tried a minimal approach like:
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre> echo "&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;";
$res = mysql_query&#40;"select a row from the table"&#41;;
while &#40;$row = mysql_fetch_object&#40;$res&#41;&#41;{ echo $row-&gt;name . "&lt;br /&gt;";}
echo "&lt;/body&gt;&lt;/html&gt;";</pre>
		</div>with charset and doctype of course?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#722</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#722</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 16:50:46]]> GMT</pubDate>
				<author><![CDATA[ noiv]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ Botton screen has been created with a code similar like the one you have shown.

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>

&lt;html&gt;
   &lt;head&gt;
       &lt;meta http-equiv=Content-Type content="text/html; charset=utf-8" /&gt;

&lt;?
     	$link = mysql_connect &#40;"localhost", "$usert", "$pass"&#41;
        	or die &#40;"no me puedo conectar al servidor: " .mysql_error&#40;&#41;&#41;;

    	mysql_select_db&#40;"edr"&#41; or die&#40;"No puedo seleccionar la base de datos"&#41;;


       	$query = "Select name FROM `geonames` WHERE `country_code` LIKE 'VN' GROUP BY name LIMIT 0 , 30 ";
  	$result = mysql_query&#40;$query&#41; or die&#40;"No puedo realizar la consulta"&#41;;


      echo "&lt;table&gt;";
      while&#40;$row=mysql_fetch_array&#40;$result&#41;&#41;{

          echo "&lt;tr&gt;&lt;td&gt;".$row&#91;name&#93;."&lt;/td&gt;&lt;/tr&gt;";
      }
      echo "&lt;table&gt;";
mysql_close&#40;$link&#41;;

?&gt;
</pre>
		</div>

Thank you very much indeed for your attention]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#723</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#723</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 16:58:32]]> GMT</pubDate>
				<author><![CDATA[ backbeat]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ Hmmm, only one last point:
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>header&#40;'Content-Type: text/html; charset=utf-8'&#41;;</pre>
		</div> as the first line of anything else in PHP. If this not helps, 
I have no more ideas, except install everything again  :( 
Lo siento mucho.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#724</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#724</link>
				<pubDate><![CDATA[Wed, 16 Aug 2006 18:22:45]]> GMT</pubDate>
				<author><![CDATA[ noiv]]></author>
			</item>
			<item>
				<title>Re:Codification issues</title>
				<description><![CDATA[ Hi fellas!

I've been working hard on trying to solve my issue and finally i got it!!

It is a very stupid thing that once you see it you say "oh Come on, how fool i am" but it's been a big while to try to solve it.

The solution is that once you select and connect to the database you have to add the next code in -> <-

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>

        $link = mysql_connect &#40;$server, $user, $pwd&#41; or die &#40;"No puedo conectar a la base de datos: " .mysql_error&#40;&#41;&#41;;

        mysql_select_db&#40;$datenbank&#41; or die&#40;"No puedo seleccionar la base de datos"&#41;;
        ---&gt; @mysql_query&#40;"SET NAMES 'utf8'"&#41;; &lt;----
</pre>
		</div>

That was what i had missing in my code and phpmyadmin did have.

I hope it help someone else. 

Cheers]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/142.page#774</guid>
				<link>http://forum.geonames.org/gforum/posts/list/142.page#774</link>
				<pubDate><![CDATA[Tue, 29 Aug 2006 11:38:18]]> GMT</pubDate>
				<author><![CDATA[ backbeat]]></author>
			</item>
	</channel>
</rss>