title: json_encode function: special characters
body: <p>Elements of an array containing special characters are converted to empty strings when encoding the array with json_encode:</p>
  
  <pre><code>$arr = array ( "funds" =&gt; "ComStage STOXX®Europe 600 Techn NR ETF", "time"=&gt;....);
  $json = json_encode($arr);
  </code></pre>
  
  <p>After JSON encoding the element [funds] is null. It happens only with special characters (copyright, trademark etc) like the ones in "ComStage STOXX®Europe 600 Techn NR ETF".</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks</p>
  
  <p>UPDATE: This is what solved the problem prior to populating the array (all names are taken from the db):</p>
  
  <pre><code>$mysqli-&gt;query("SET NAMES 'utf8'");
  </code></pre>