Convert a utf-8 string to UTF16 entities in PHP
<p>I have this code</p>

<pre><code>&lt;?php

$message = "ΓΙΑ ΝΑ ΔΟΥΜΕ ΤΙ ΘΑ ΔΟΥΜΕ.";
$tmp = mb_convert_encoding($message, 'UTF-16BE', 'utf-8');
echo $tmp;
?&gt;
</code></pre>

<p>The $message value holds some Greek words. I want to have something like this "0393 0399 0391 0020 039D 0391 0020 0394 039F 03A5 039C 0395 0020 03A4 0399 0020 0398 0391 0020 0394 039F 03A5 039C 0395" but instead I get some black diamonds with question marks in the browser.</p>

<p>I tried to follow those instructions (<a href="http://stackoverflow.com/questions/155514/how-to-convert-a-utf-8-string-to-a-utf-16-string-in-php">Stack Overflow question</a>) but with no luck. I also tried to change the encoding of the file from UTF-8 to UTF-8 without BOM, but again no luck.</p>

<p>While searching I found this amazing webpage <a href="http://rishida.net/tools/conversion/" rel="nofollow">Unicode Code Converter</a> so I could test if I was getting the right entities.</p>
