The hexadecimal encodings of SQL Server and MySQL begin to diverge at position 11. The character at this position is ä , the first non-ascii character. Therefore, there is a likely reason to believe that each database uses a different encoding.
MySQL coding is UTF-8
The ä encoding in UTF-8 is 0xC3A4 , so MySQL uses. This is confirmed by the utf-8 decoder:
53414D31302F32303130C3A4C3B6C3BCC39F2A23C3A92D656E --> SAM10/2010äöüß*
The reason it is disabled is your MySQL client, which points to a cutoff with ... at the end.
SQL Server encoding is Latin1_General (aka Windows-1252)
SQL Server Encoding ä - 0xE4 . It is probably encoded in SQL Server Latin1_General , which corresponds to Windows-1252 . Other öüß characters öüß converted to 0xF6FCDF under Windows-1252, confirming the assumption.
To force SQL Server to use a different encoding, specify the collate :
cast('öüß' AS varchar(5)) collate French_CS_AS
The SQL Server hexadecimal string is disconnected due to your cast(... as varbinary) . If n is not specified using the CAST function, the default length is 30 . Try explicitly specifying the size or setting it to max :
cast('abcd' as varbinary(max)) ^^^^^
Andomar
source share