title: unicode characters (like emoticons) in telegram bot message (or keyboard)
body: <p>I'm playing with Telegram bot development.
  The only thing in which i have no success is sending unicode characters.</p>
  
  <p>The way i call the "sendMessage" api is in php with curl:</p>
  
  <pre><code>curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, array("chat_id" =&gt; $chat_id, "text" =&gt; "\u2b50"));
  </code></pre>
  
  <p>The code above should post a star icon on the chat, but instead shows the exact text:</p>
  
  <blockquote>
    <p>\u2b50</p>
  </blockquote>
  
  <ul>
  <li>Escaping the text ("\\u2b50") doesn't work.</li>
  <li>If the bot acts as an echo (replies with the received text) when typing "\u2b50" in the client, it replies with the star icon.</li>
  <li>same behavior has for the keyboard keys (reply_markup.keyboard)</li>
  </ul>
  
  <p>Thanks in advance</p>
  
  <p>EDIT:
  solved with solution from bobince (thanks!).</p>
  
  <p>used inline function like:</p>
  
  <pre><code>$text = preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function ($match) {
      return iconv('UCS-4LE', 'UTF-8', pack('V', hexdec($match[1])));
  }, $text);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$text = preg_replace("/\\\\u([0-9a-fA-F]{4})/e", "iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))", $text);
  </code></pre>