the string is a utf-8 encoded string not unicode object

>>> print 'Moj\xc4\x8dca'.decode('utf-8')
Mojčca



2014-12-30 15:32 GMT+01:00 Niphlod <niph...@gmail.com>:

> let's tackle the problem from another side: if you avoid using DAL and
> resort to "pure" psycopg2, does it work ? If yes, can you post the code ?
> From there we can compare what DAL does and pinpoint the root cause
> accordingly.
>
> On Tuesday, December 30, 2014 8:41:56 AM UTC+1, Yebach wrote:
>>
>> Hello
>>
>> Setting db_codec changes nothing
>>
>> 2014-12-29 17:21 GMT+01:00 Marco Mansilla <thebig...@gmail.com>:
>>
>>> El Mon, 29 Dec 2014 05:53:37 -0800 (PST)
>>> Yebach <vid....@gmail.com> escribió:
>>>
>>> > hello
>>> >
>>> > I have a postgres dabatabase with utf8 encoding
>>> >
>>> > after executing
>>> > workersDb = db(db.worker.w_organisation == org).select(db.worker.id,
>>> > db.worker.w_nick_name).as_list()
>>> >
>>> > I get a list of dict where my strings are endoed as
>>> >
>>> > 'Moj\xc4\x8dca'
>>> >
>>> > where it should write Mojčca
>>> >
>>> > How do i set the encoding?
>>> >
>>> > Thank you
>>> >
>>> >
>>> right at the end of the section
>>>
>>> http://www.web2py.com/books/default/chapter/29/06/the-
>>> database-abstraction-layer#Connection-strings--the-uri-parameter-
>>>
>>> Marco.
>>>
>>> --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/web2py/uUf6xZaUY_Y/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Lep pozdrav
>>
>> Vid Ogris
>>
>>
>>   --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to