0

How to convert special characters like this in PHP: Frédéric, Bérard, Jérémy

They are used in French names.

For HTML entities like & $eacute; è I use:

html_entity_decode($myvar, ENT_QUOTES, 'utf-8');

medk
  • 9,233
  • 18
  • 57
  • 79
  • 3
    You seem to have a charset issue somewhere, that's why your words have broken characters in them. See [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Qirel Jan 09 '17 at 18:09
  • 1
    this will be your guy: http://php.net/manual/en/function.htmlspecialchars.php – CodeGodie Jan 09 '17 at 18:15
  • 1
    In Portuguese I often have the same issue... have you tried using utf8_encode()/utf8_decode() - http://php.net/manual/en/function.utf8-encode.php? – DouglasCamargo Jan 09 '17 at 20:09

0 Answers0