Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid byte sequence for Utf-8 when "insert into.."

Status
Not open for further replies.

codymanix

Programmer
Aug 4, 2002
11
DE
I got a message sounding like that. My Postgres server runs Utf8 and Iam using WindowsXP. The message appears when I try to insert string data which contains non-ascii characters like ä.
Iam using the Npgsql .NET provider to access the database. Since .NET internally always uses UTF16 I do not see the problem.
 
You have to use ENCODING=UNICODE int hte connection string. I suppose you are using Npgsql. This oprion does not exist in the PostgreSQL documentation, you can only find it in the documentation of NpgsqlConnecetion constructor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top