Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ayupchap
Helper III
Helper III

ODBC Error - Not sure how to resolve it

Hi all

 

OK so I am getting this error with an SQL query:

 

Details: "ODBC: ERROR [22P05] ERROR: character with byte sequence 0xe2 0x80 0x8e in encoding "UTF8" has no equivalent in encoding "WIN1252";
Error while executing the query"

 

 

Anyone know how I can get around this issue?

8 REPLIES 8
clark_vera
New Member

I had this issue with Power Bi and Postgres. The solution was to setup a SYSTEM DSN (Not user DSN) with Unicode NOT Ansi64 in the odbc driver

 

clark_vera_0-1713196763202.png

 

Anonymous
Not applicable

Conseguimos resolver da seguinte forma.

 

Driver={PostgreSQL Unicode(x64)}; Server= IP do servidor ; Port= Nome da porta; Database= Nome do Bando de dados

 

Colocando isso na conexão do ODBC, e mudei o DNS do usuário colocando unicode, e no DNS do sistema para Unicode também.

This solution solved the problem for me! Fortunately, I can read Spanish. lol. Install the PostgreSQL ODBC for Unicode(x64) and use that one instead when connecting to the DB. In my case, I was trying to connect to AWS Cloud version of PostgreSQL in Supabase. 

Johannf78
Advocate I
Advocate I

Clicking on the "Manage DSN" Button and changing the driver from "PostgreSQL ANSI(x64)" to "PostgreSQL Unicode(x64)" solved it for me.

You have to save and restart the machine tough 

Screenshot 2022-03-24 Correct.jpg

dataco
New Member

Hi,

 

I have same problem, anyone have find out solution?, please

HotChilli
Super User
Super User

Postgres?

 

If so, you'll need to change character encoding to unicode (maybe in the DSN)-  (or find a different driver as in this    ssrs odbsc error thread )

Ah ok, yes, postgres

 

So I changed the DSN to unicode in the ODBC connector.  I thought it had worked as it shows me the load sample data

 

odbc error.PNGerror 2 odbc.PNG

Any idea why this might still be happening?  Thanks for your help on this.  

Getting closer!

Can you experiment by clicking 'edit'  instead of load.  Can you get to the Advanced editor and try a different encoding?  Try selecting a more limited selection of fields.  That might help you discover whether it's an unusual character that doesn't translate to code page 1252 in Windows or a hidden character.

 

 

Found this on the forum:

Using the postgres ODBC and configuring the connection in unicode mode on System DSN the issue is solved (PBI connection will be ODBC)

https://www.postgresql.org/ftp/odbc/versions/dll/

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.