I have text coming from a SOAP service that i need to input into my mysql DB
text comes from SOAP in UTF-8 and MySQL tables are set to latin1_swedish_ci
I found how to fix the problem on my old server, we just moved to a new server and script are not working any more
My test string is this "abc €ùÁÄÅ def ‘O’"
If i don't change the string i just update the database the fist part "€ùÁÄÅ" don't have issue but the second mess up into "âOâ"
if i use
$mySql = iconv("UTF-8", "ISO-8859-1//IGNORE", $mySql);
i lose "€ùÁÄÅ" and "‘O’" part of the string
if i use
$mySql = iconv("UTF-8", "ISO-8859-1//TRANSLIT", $mySql);
this is what i was using on old server, but on new server I lose the all string $mySql is empty
if i use
$mySql = utf8_decode($mySql);
i get question marks "abc ????? def ?O?"