Accented characters stored in MySQL database

narutoroot

New Member
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: \[code\]qui r?fl?te la liste.\[/code\]Hence, I use \[code\]htmlentities()\[/code\] (or \[code\]htmlspecialchars()\[/code\] ) 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, \[code\]<strong>\[/code\] is converted to \[code\]<strong>\[/code\] and therefore not understood by the browser.How can I simultaneously get accented characters displayed correctly and my HTML parsed correctly?Thank you!
 
Back
Top