开发者

MySql Turkish Characters

开发者 https://www.devze.com 2022-12-18 12:42 出处:网络
I\'m writing a program. This program transfers data t开发者_JS百科o MySql database which is in SQL Server Datas.

I'm writing a program. This program transfers data t开发者_JS百科o MySql database which is in SQL Server Datas. MySql database default charset is Latin1. Latin5 charset is usually used for Turkish characters. But I can't change mysql table's charset because it's a very old database.

Is there any way to import turkish chars to mysql database correctly?


To test try:

CREATE TABLE newtable LIKE oldtable;

-- change the character latin character set to latin5
ALTER TABLE newtable MODIFY latin1_text_col TEXT CHARACTER SET latin5;

INSERT INTO newtable
SELECT * from oldtable;

If everything looks good you can drop the old table and rename the newtable to have the same name as the oldtable.

0

精彩评论

暂无评论...
验证码 换一张
取 消