2
I am creating an application that needs to take some data that is in an SQL Server database with iso-8859-1 encoding, and insert into a Mysql database with utf-8 encoding.
A few words with accents are giving error when inserting into Mysql database.
Incorrect string value: '\xC7AFR\xC3O' for column 'produto' at row 1
The word that appears with error is Saffron. How can I get around this error and enter the record in the database?
Obs: I’m using PHP
Good morning! Tried to use replace in SQL?
– Sr. André Baill
No. How can I use?
– Amanda Lima
field = REPLACE(field, 'TAG1', ') - field = field name, tag1 = tag that will be replaced and ' ', will be replaced by empty... I believe that the problem there would be the '', then you would exchange the tag1 for and leave the next empty.. You can test a manual insertion to see...
– Sr. André Baill
Already tried http://php.net/manual/en/function.utf8-encode.php and http://php.net/manualen/function.utf8-decode.php?
– user3603
I tried @Gerep, it didn’t work.
– Amanda Lima
@Andrébaill, I’ll try, thank you
– Amanda Lima
Post the minimum code please.
– Guilherme Nascimento