简体   繁体   中英

insert data from mssql to mysql database with greek characters

i have a problem with some databases

i am trying to update data (greek language) from a ms-sql database with SQL_Latin1_General_CP1253_CI_AI encoding to a mysql database with utf8 encoding and it comes like this: ÕäáôéêÞ

i tried mb_convert_encoding and some other solutions but nothing worked.

any help would be appreciated.

well after some more research i did found a part solution, i used this code:

$connectionInfo = array( "Database"=>"database", "CharacterSet"=>"UTF-8", "UID"=>"uid", "PWD"=>"pwd");

and now it appears ok on website.

But the problem still remains when i store the variable on the mysql server

$sql_update_remarks = "UPDATE CK1f14_posts set post_content = '$so_re' WHERE ID = '$post_id'";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM