Re: [web2py] database select from set encoding

2015-01-02 Thread Paolo Valleri
Postgres adapter sets client_adapter to UTF8 https://github.com/web2py/pydal/blob/master/pydal/adapters/postgres.py#L147 Do you have the same problem without the as_dict? If you have direct (command line) access to the db, post the content of the field. Paolo On Friday, January 2, 2015 4:03:41

Re: [web2py] database select from set encoding

2015-01-02 Thread Vid Ogris
decode('utf-8') crashes my view. and I can't find the error 2014-12-30 19:37 GMT+01:00 Michele Comitini michele.comit...@gmail.com: 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:

Re: [web2py] database select from set encoding

2014-12-30 Thread Niphlod
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

Re: [web2py] database select from set encoding

2014-12-30 Thread Michele Comitini
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

[web2py] database select from set encoding

2014-12-29 Thread Yebach
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

Re: [web2py] database select from set encoding

2014-12-29 Thread Marco Mansilla
El Mon, 29 Dec 2014 05:53:37 -0800 (PST) Yebach vid.og...@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

Re: [web2py] database select from set encoding

2014-12-29 Thread Vid Ogris
Hello Setting db_codec changes nothing 2014-12-29 17:21 GMT+01:00 Marco Mansilla thebigsho...@gmail.com: El Mon, 29 Dec 2014 05:53:37 -0800 (PST) Yebach vid.og...@gmail.com escribió: hello I have a postgres dabatabase with utf8 encoding after executing workersDb =