Storing and retrieving unicode string (हिन्दी) using PHP and MySQL

I have to store hindi text in a MySQL database, fetch it using a PHP script and display it on a webpage. I did the following:
I created a database and set its encoding to UTF-8 and also the collation to utf8_bin. I added a varchar field in the table and set it to accept UTF-8 text in the charset property.
Then I set about adding data to it. Here I had to copy data from an existing site. The hindi text looks like this: सूर्योदय:05:30
I directly copied this text into my database and used the PHP code echo(utf8_encode($string)) to display the data. Upon doing so the browser showed me "??????".
When I inserted the UTF equivalent of the text by going to "view source" in the browser, however, सूर्योदय translates into सूर्योदय.
If I enter and store सूर्योदय in the database, it converts perfectly.
So what I want to know is how I can directly store सूर्योदय into my database and fetch it and display it in my webpage using PHP.
Also, can anyone help me understand if there's a script which when I type in सूर्योदय, gives me सूर्योदय?


Solutio:
I wrote the following sample script which worked for me. Hope it helps someone else too
<html>
  <head>
    <title>Hindi</title></head>
  <body>
    <?php
      include("connection.php"); //simple connection setting
      $result = mysql_query("SET NAMES utf8"); //the main trick
      $cmd = "select * from hindi";
      $result = mysql_query($cmd);
      while ($myrow = mysql_fetch_row($result))
      {
          echo ($myrow[0]);
      }
    ?>
  </body>
</html>
The dump for my database storing hindi utf strings is
CREATE TABLE `hindi` (
  `data` varchar(1000) character set utf8 collate utf8_bin default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `hindi` VALUES ('सूर्योदय');

10 Best Countries To Live For Software Engineers

Have you ever wonder which country is the best to live for IT engineers?

Most of us would probably said – that one where they earn most. However, this is not the whole truth.

We prepared a list for you which presents median salary for software engineers across the top 10 countries and few more interesting statistics.



Methodology:
1. We chose the top 10 countries in the list of “highest median earnings of software engineers” (Data source: Indeed.com)

2. We compared the cost of living in these countries (Data source: Eardex)

3.  We used the “Happiness index” (Source: happyplanetindex )

Below we present a list of 10 best countries to live for software engineers.

10. Canada
I. Median annual pay for software engineer – $57500 

II. Position in the world ranking of “Happiness Index – experienced well-being” - 2
III. Position in the ranking of  “Best for workers: Countries” – 11 

9. New Zealand
I.Median annual pay for software engineer – $59600 

II.Position in the world ranking of “Happiness Index” - 17

III.Position in the ranking of  “Best for workers: Countries” – 8

8. Sweden
I. Median annual pay for software engineer – $61400 

II. Position in the world ranking of “Happiness Index” - 5

III. Position in the ranking of  “Best for workers: Countries” – 8

7. Germany
I. Median annual pay for software engineer – $63800

II. Position in the world ranking of “Happiness Index” - 27

III. Position in the ranking of  “Best for workers: Countries” – 20

6. Australia
I. Median annual pay for software engineer – $65900 

II. Position in the world ranking of “Happiness Index” - 8

III. Position in the ranking of  “Best for workers: Countries” – 14

5. Israel
I. Median annual pay for software engineer – $70700 

II. Position in the world ranking of “Happiness Index” - 10

III. Position in the ranking of  “Best for workers: Countries” – 10

4. Denmark
I. Median annual pay for software engineer – $71500 

II. Position in the world ranking of “Happiness Index” - 1

III. Position in the ranking of  “Best for workers: Countries” – 4

3. United States
I. Median annual pay for software engineer – $76000 

II. Position in the world ranking of “Happiness Index” - 16

III. Position in the ranking of  “Best for workers: Countries” – 7

2. Norway
I. Median annual pay for software engineer – $81400 

II. Position in the world ranking of “Happiness Index” - 3

III.Position in the ranking of  “Best for workers: Countries” – 6

1. Switzerland
I. Median annual pay for software engineer – $104200 

II. Position in the world ranking of “Happiness Index” - 6

III.Position in the ranking of  “Best for workers: Countries” – 24


Source: IT Flow