title: Properly display Chinese character from MySQL and PHP through ajax
body: <p>How to properly display Chinese characters in HTML through ajax using PHP?</p>
  
  <p>In the MySQL I have this data <code>èŠ±æ ·å¹´åŽ</code>, if I use PHP echo it shows <code>花样年华</code>, but if I use ajax callback I get <code>èŠ±æ ·å¹´åŽ</code> (eventname), the ajax code is as below:</p>
  
  <pre><code>$.ajax({
      url: "action/getEvent.php",
      type: "POST",
      data: {'LoadEvent':''},
      dataType: "json",
      success: function(data) {
          if(data.eventname!=''){
              alert(data.eventname);
          }
      },
      error: function (xhr, ajaxOptions, thrownError) {
          console.log(xhr);
      }
  });
  </code></pre>
  
  <p>Is it I need to do something on the data before saving into MySQL database? But why PHP is ok only ajax is not?</p>