3
votes

I have a MSSQL Server 2005 and MySQL Server as linked server.
I want to save particular data from MSSQL to MySQL.
And I have a huge problem related with encoding.

MS SQL

select SERVERPROPERTY ('collation')
Result: Cyrillic_General_CI_AS

MySQL

mysql> SHOW VARIABLES LIKE 'character\_set\_%';
+--------------------------+--------+
| Variable_name            | Value  |
+--------------------------+--------+
| character_set_client     | utf8   |
| character_set_connection | utf8   |
| character_set_database   | utf8   |
| character_set_filesystem | binary |
| character_set_results    | utf8   |
| character_set_server     | utf8   |
| character_set_system     | utf8   |
+--------------------------+--------+

When I'm trying to retrive data from MySQL or to insert ones to MySQL
I have a wrong character set in text field,
something like that "???????????????"

How can I convert text data to UTF-8 encoding before inserting the data to linked server?

Or should I change some settings? I don't want to change encoding of MySQL server on CP-1251, it's not convenient for me.

1

1 Answers

0
votes

What is your Collation Compatible property for linked server? This might help. Have you tried COLLATE?