I Have a form with one textbox called(ProductTitle)
if I write as example “Étuit” in the textbox and click on Save, I post the data in a table called Product. The result int the database for ProductTitle is Étuit. My concern is about the Special character. Instead of putting É in the database , I got that É
When I Load the Product Title (“Étuit”) from the database into a span. That show correctly.
BUT When I load it inside a Textbox to Edit the Product Title, that show Étuit.
Anybody know why.
I Put that in the html head
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Note : When I Click save on the form, the data is posted with jquery ajax method.
Advertisement
Answer
Take a look at utf8_encode()
and utf8_decode()
. Also take a look at multibyte string functions.