Search code examples
sql-serverutf-8linked-server

SQL Linked Server to UTF-8 database


I am trying to create a linked server from SQL Server 2008 R2 to an SAP IQ database, which has the UTF-8 Charset.

I am unable to get the correct characterset viewable on queries using this linked server.

I have tried everything, using native OLE DB provider of SAP IQ, using ODBC connectivity, playing with different connection strings, but my major concern is that it's impossible because SQL Server does not support UTF-8.

Correct characters when viewing in Interactive SQL:

Correct characters when viewing in Interactive SQL

Messed up characters in SQL Management Studio:

Messed up characters

Any thoughts?


Solution

  • Finally solved it, after a few hours of debugging. :)

    You have to use an ODBC connection, with the CharSet parameter set to 'windows-1252'. Then it works perfectly.

    ODBC settings