On Thu, Feb 14, 2008 at 06:32:06PM -0500, Max Aginaga wrote:
> I am using SQLObject-0.10.0b2 on Postgresql 8.3. The database is using
> UTF8 as its encoding.
> 
> I am connecting to the db with the connectionURI
> 
> "postgres://%s:[EMAIL PROTECTED]/%s"%(DB_USERNAME, DB_PASSWORD, DB_HOST, 
> DB_NAME)
> 
> The connection succeeds, but I cannot insert anything into the db: I
> get an exception which ends in
> 
> ProgrammingError: invalid byte sequence for encoding "UTF8": 0xfe
> HINT: This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".
> 
> The trouble is that appending "?client_encoding=utf-8" to the
> connection URI generates the error

   This is only valid for MySQL backend. PostgreSQL backend in SQLObject
doesn't know anything about encodings.
   I use PostgreSQL, and all my databases are in UTF-8, but I never was in
need to set client_encoding. I use UnicodeCol()umns with default UTF-8
encoding, and they pass data to and fro Pg in utf-8, no problem so far.
Locale at the client part is koi8-r or windows-1251.
   If UnicodeCol() don't help, it would be helpful to see a small test
program that demonstrates the problem.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to