简体   繁体   English

使用希腊字符将数据从 mssql 插入 mysql 数据库

[英]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: ÕäáôéêÞ我正在尝试将数据(希腊语)从使用 SQL_Latin1_General_CP1253_CI_AI 编码的 ms-sql 数据库更新到使用 utf8 编码的 mysql 数据库,它是这样的:ÕäáôéêÞ

i tried mb_convert_encoding and some other solutions but nothing worked.我尝试了 mb_convert_encoding 和其他一些解决方案,但没有任何效果。

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"); $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但是当我将变量存储在 mysql 服务器上时问题仍然存在

$sql_update_remarks = "UPDATE CK1f14_posts set post_content = '$so_re' WHERE ID = '$post_id'"; $sql_update_remarks = "更新 CK1f14_posts 设置 post_content = '$so_re' WHERE ID = '$post_id'";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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