Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

Problem with ZPsycopgDA and unicode-output

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


marcel at risclog

May 15, 2013, 7:17 AM

Post #1 of 1 (120 views)
Permalink
Problem with ZPsycopgDA and unicode-output

I got a problem regarding the Database Output via ZPsycopgDA Adaptor in Zope 2.9:

1. My PostgresDB is encoded in UTF-8
2. My Z Psycopg 2 DB Connector is set to UTF-8

However the output of my db over the connector is somehow wrong encoded:

An Example:

In my utf-8 db it says:
"Bitte auswählen"

The db connector, however returns the following:

print repr(dbstring)
'Bitte ausw\xc3\xa4hlen'

As you can see, it looks like correct unicode, but in fact the leading "u" is missing
and a check with instance(dbstring, unicode) returns FALSE!
So actually it seems to give me an ordinary string but no real unicode-string!

My Question:

Is there any way to setup ZPsycopg2 DB Connector to return real unicode-strings from my DB?


Regards

Marcel
_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.