Hello…
I created a form for users to input data on a mysql DB. Accents appear OK on the form, I do a echo before the Query to insert the data on DB and no problem with the accents, but when I go to the DB, those accents inserted by the users don't appear OK.
The tables are UTF8 and everything in PHP is encoded in UTF8.
Where might be the problem?
Thanks.
Accents problem when inserting on DB
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Accents problem when inserting on DB
You need to set the collation for that table/field to support UTF8 probably.
(#10850)
Re: Accents problem when inserting on DB
I already did that (forget to mention it).
But I think i did it!!!
What I did was to use ut8_encode when establishing a connection, now everything appears OK. The data already inserted there wasn't changed but all the new data appears OK.
Thanks for the answer.
But I think i did it!!!
What I did was to use ut8_encode when establishing a connection, now everything appears OK. The data already inserted there wasn't changed but all the new data appears OK.
Thanks for the answer.
Re: Accents problem when inserting on DB
This is odd.
After inserting a few data, everything was allright, but suddenly the accents on the DB are strange again.
When I put them on a web page they appear OK, but on the DB no.
Is there a problem if they stay like this?
After inserting a few data, everything was allright, but suddenly the accents on the DB are strange again.
When I put them on a web page they appear OK, but on the DB no.
Is there a problem if they stay like this?