I have a webapp that stores French text — which potentially includes accented characters — in a MySQL database. When data is retrieved directly through PHP, accented characters become gibbirish. For instance: qui r�fl�te la liste.
Hence, I use htmlentities() (or htmlspecialchars() ) to convert the string to html entities, and all is fine. However, when I come to output data that contains both accented characters and HTML elements, things get more complicated. For instance, <strong> is converted to <strong> and therefore not understood by the browser.
How can I simultaneously get accented characters displayed correctly and my HTML parsed correctly?
Thank you!
Maybe you could take a look to
utf8_encode()andutf8_decode()