[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

Problem displaying unicode data with mysql in Linux

Asked by ryancys in PHP Scripting Language

Tags: unicode, php, mysql, data, display

Hi,

I'm facing problem displaying unicode data with mysql in a Linux server (please note i got no problem display it on a local Windows machine).

MySQL database/table is set as below:

Storage Engine: MyISAM
Charset: utf-8
Collation: utf8_general_ci

My test script is like below:

<?php
      header ('Content-type: text/html; charset=utf-8');
?><head>
<title>Untitled Document</title>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body>
<?php
      echo "Hi, Hello world, &#20813;&#36027;&#21443;&#21152;&#20843;&#26376; now is " . date("d m Y h:i:s A") . "<br><br>";
      //echo phpinfo();

/* Connecting, selecting database */

$link = mysql_connect("127.0.0.1", "root", "password") or die("Could not connect : " . mysql_error());
mysql_select_db("test") or die("Could not select database");

echo "Connected successfully";

/* Performing SQL query */
$query = "SELECT * FROM table1 ";
$result = mysql_query($query) or die("Query failed : " . mysql_error());

/* Printing results in HTML */
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
   echo "\t<tr>\n";
   foreach ($line as $col_value) {
         echo "\t\t<td>" .  $col_value . "</td>\n";
   }
   echo "\t</tr>\n";
}
echo "</table>\n";

/* Free resultset */
mysql_free_result($result);

/* Closing connection */
mysql_close($link);

?>
</body>

The current issue is the data pulled out is displayed in "?" , which is not displayed properly.

This is the phpinfo() i get from Linux Server:
http://www.myjavaserver.com/~ryancys/tmp/phpinfo.htm

Anyone can help debug/ find the problem out? Thanks
 
Related Solutions
Keywords: Problem displaying unicode data with m…
 
Loading Advertisement...
 
[+][-]08/17/06 03:15 AM, ID: 17332810Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/17/06 10:46 AM, ID: 17336025Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/17/06 07:16 PM, ID: 17339453Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/18/06 01:04 AM, ID: 17340694Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/18/06 01:23 AM, ID: 17340739Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/18/06 01:25 AM, ID: 17340749Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/18/06 02:41 AM, ID: 17340998Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/18/06 02:51 AM, ID: 17341027Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/18/06 05:18 PM, ID: 17346318Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/18/06 07:19 PM, ID: 17346560Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/22/06 01:05 AM, ID: 17361788Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: PHP Scripting Language
Tags: unicode, php, mysql, data, display
Sign Up Now!
Solution Provided By: Squinky
Participating Experts: 3
Solution Grade: B
 
[+][-]10/10/06 04:53 AM, ID: 17697894Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/10/06 07:45 AM, ID: 17699215Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/10/06 07:59 AM, ID: 17699348Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/31/06 09:21 AM, ID: 17843655Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/31/06 05:23 PM, ID: 17847044Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81