title: Convert request input containing emoji in PHP and saving in MySQL
body: <p>I have php script that takes user's text from </p>
  
  <pre><code>$_REQUEST['comment_text']
  </code></pre>
  
  <p>And saves it into MySQL database using MySQLi.</p>
  
  <pre><code>$comment_text = $mysqli-&gt;real_escape_string($_REQUEST['comment_text']);
  $mysqli-&gt;query("INSERT INTO comments (text) VALUES ('$comment_text')");
  </code></pre>
  
  <p>Everything is working as expected. But I have problems when there are emojis in user's input. My comments table has CHARSET=utf8 and I need to leaved it in this way.</p>
  
  <p>So if I want to store emojis I have to store them this way</p>
  
  <blockquote>
    <p>"\ud83d\ude09"</p>
  </blockquote>
  
  <p>But how should I handle user's input in this case?</p>