title: PHP - How to serialize data with special characters from database?
body: <p>i have a string with special characters, like:</p>
  
  <pre><code>$text = "NÃO";
  </code></pre>
  
  <p>When i use serialize($text), returns</p>
  
  <pre><code>a:1:{i:0;s:4:"NÃƒO";}
  </code></pre>
  
  <p>but when i use a string that i get from my database, like:</p>
  
  <pre><code>$query = SELECT special_text FROM ...
  (...)
  $text = $row-&gt;"special_text"
  serialize($text);
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>a:1:{i:0;s:3:"NÃO";}
  </code></pre>
  
  <p>, what is crashing my script.</p>
  
  <p>what i have to do when i serialize data from database?
  Thx, and sorry for my english</p>