title: In PHP, How to convert unicode number strings into numbers correctly?
body: <p>I have csv file encoded in unicode and when I read it either with fgetcsv or fgets and try to use the number strings as integer numbers in PHP, only the first character of the string is casting into a number, i.e </p>
  
  <pre><code>$str='2012';
  $num=$str + 0; OR $num=(int)$str;
  echo $num;
  results -&gt; 2
  </code></pre>
  
  <p>How can I convert these unicode number strings correctly?</p>
  
  <p>I was not successful using conversion functions in PHP from unicode to other charsets!</p>
  
  <p>The only way I know is to use a simple text editor like notepad or notepad++ and convert the file format to an ANSI csv.</p>
  
  <p>Thanks for your help.</p>