none
How to use openquery for UTF-8 character RRS feed

  • Question

  • Hi All,
    I am using SQL Server 2005, i want to query a data from Postgres database using an openquery, i got the following error:

    character 0xc296 of encoding "UTF8" has no equivalent in "WIN1252".

    Can you guys give me some solution how to load this type of data? Thank you in advance for your help.


    Thank you,


    Sami
    Wednesday, May 20, 2009 11:53 PM

All replies

  • Hey Sami,

    My guess is that you are trying to read an extended character into a VARCHAR using the 1252 character set.  Try changing that to an NVARCHAR.

    If that doesn't help:

    Could you please post the text of your statement that includes the OPENQUERY please?
    Also, if you can, it would help to know the settings of the linked server - from the Linked Server Properties window in SSMS, on the Server Options tab.  Example settings on this page include 'Collation Name' and 'Collation Compatible'.

    Thanks

    Paul
    Thursday, May 21, 2009 5:58 AM
  • SELECT 
          CAST(Column1 AS nvarchar(1000))   AS Name_Description
    FROM OPENQUERY (Link_Server,'
          SELECT 
                A."Column1"
          FROM 
              "Schema_Name"."Table_Name"  A')
    Column1 is the one which has UTF8.


    Thanks,

    Sami
    Thursday, May 21, 2009 3:03 PM
  • Hi Paul,
    Thank you for your help, here is the information i have.
    Collation Compatible =False
    Collation Name = there is nothing (just empty)


    Thanks,
    Sami
    Thursday, May 21, 2009 3:07 PM