title: Convert from "Java Escape" to Index in PHP
body: <p>are there any form to convert a string in Java Escape to Index unicode in PHP?</p>
  
  <p>I have this string:</p>
  
  <pre><code>$ str = "\ud83d\ude0e";
  </code></pre>
  
  <p>And I need obtain the portion after U+: </p>
  
  <pre><code>U+1F60E 
  </code></pre>
  
  <p>Or the python code:</p>
  
  <pre><code>u'\U0001f60e'
  </code></pre>
  
  <p>The correspondence codes: <a href="http://www.charbase.com/1f60e-unicode-smiling-face-with-sunglasses" rel="nofollow">http://www.charbase.com/1f60e-unicode-smiling-face-with-sunglasses</a></p>
  
  <p>Thank you.</p>
  
  <p>==== EDIT 09/03 ====</p>
  
  <p>Sorry for my delay and thank you for your reply, but I´m not able to do what I need.</p>
  
  <p>I need to replace the caracter with an image, so I do:</p>
  
  <pre><code>$src = "Hello "."\ud83d\ude0e";
  
  $replaced = preg_replace("/\\\\u([0-9A-F]{1,8})/i", "&amp;#x$1;", $src);
  
  $replaced = str_replace('&amp;#x1f60e', '&lt;img src="data/emoji_new/1F60E.png"&gt;', $replaced);
  
  $result = mb_convert_encoding($replaced, "UTF-8", "HTML-ENTITIES");
  </code></pre>
  
  <p>But, not work.. The result is:</p>
  
  <pre><code>"Hello ��"
  </code></pre>
  
  <p>Any more idea??</p>
  
  <p>Thank you again!</p>