Page 1 of 1

Problem with encoding

Posted: Tue 09 Feb 2010 15:45
by guialv
I have a database with encoding latin1 and the client_encoding=latin1.
I can insert data to the database directly without problems but I can't do it from my .NET application using dotConnect for PostgreSQL. I must insert special characters like ñ or accented vowels (á, é, etc).
I read that I should set the unicode property to true in the object PgSqlConnection but do not know how I can do it because I am using an ObjectContext object of ADO.NET 3.5
Help me please

Posted: Wed 10 Feb 2010 11:22
by Shalex
When you are generating Devart Entity Model, the connection string used by your ObjectContext is stored at the *.config file of your application. Please add the Unicode=true; parameter to your connection string and notify us about the results.

Posted: Mon 15 Feb 2010 15:23
by guialv
connectionstring="...unicode=true". Now the error always is "invalid byte sequence for encodign "UTF8". Database encoding = latin1. client_encoding=latin1 in postgres.conf. Help me please

Posted: Mon 15 Feb 2010 15:33
by guialv
Problem resolved. I put rtf content in a RichTextBox and after save this content from the .rtf property of the richtextbox object to the database.
Thank you for help.