I have french words stored in database,however while displaying in browser the characters are not properly displayed,displays like � and so on..How convert such word exactly to french words same as entered in database using PHP ? I have tried html_entity_decode(),works for some of the cases.
Asked
Active
Viewed 31 times
0
-
Some Code would be helpful to spot the error... – Rizier123 Dec 16 '14 at 05:47
-
@Rizier123 I am useing one function function dispContent_2($val){ $val = stripslashes(trim($val)); $content = html_entity_decode($val); //$content = htmlentities($content, ENT_NOQUOTES, 'ISO-8859-1'); //ENT_NOQUOTES //$content = html_entity_decode($content, ENT_NOQUOTES, 'ISO-8859-1'); return $content; } – Smit Mehta Dec 16 '14 at 05:49
-
Please use the edit button under your question! (http://stackoverflow.com/posts/27498334/edit) – Rizier123 Dec 16 '14 at 05:52
-
And the output code by itself is useless without elaborating how you mangled the data beforehand. Why the html_entity_decode? And while Latin-1 suffices for french, you better just use UTF-8 throughout if you're unversed. – mario Dec 16 '14 at 05:54