encoding from any language to utf in php
<p>I insert from csv characters from different languages.. </p>

<p>I apply this to every set of characters:</p>

<pre><code>    private function process_elements($element){
       utf8_encode($element);
      return $element;
}
</code></pre>

<p>The problem is when they go into the database, they go like this:</p>

<pre><code>???????? ?? ???????????? ????? ??????? ??? ???????...
</code></pre>

<p>When I retrieve them from the databse, I also get this.</p>

<p>This happens with greek. However, when I retrieve greek pages (through scrapping), who are on a utf encoded page. The characters look like this:</p>

<pre><code>Î”ÎµÏ‚ webcam Î´Ï‰Î¼Î¬Ï„Î¹Î± | Gr.ImLive.com
</code></pre>

<p>which is okay, because when i use the utf8_encode function, they look normal on the screen..</p>

<p>But when the data is taken from the csv and be put into the database, i get those question marks..</p>

<p>Is there a way to encode form any language to utf.. why retrieving data from csv and a utf8 encoded webpage makes such a difference.. they look the same.. how do I address that problem?</p>
