Murat
Murat

Reputation: 803

MySql Turkish Characters

I'm writing a program. This program transfers data to 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?

Upvotes: 2

Views: 2516

Answers (1)

Yada
Yada

Reputation: 31225

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.

Upvotes: 1

Related Questions