Hello,

I'm having a unicode problem with the DAL.

I'm developing a (mainly) RPC database application with qooxdoo as JS
framework and web2py as the webserver.

I have created a fairly generic update_record function which simply
gets two input variables - a table name and a data dictionary with
name/value pairs which correspond to the fields of the table.
My function looks like this:

def update_record(table_name, data):
        db(db[table_name]['id'] == data['id']).update(**data)
        return db(db[table_name]['id'] == data['id']).select()

My application should work both in English and in German, and my
problem is that when I try to update a string value with an Umlaut
(example - "Ɯberwlad") I get an error:
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in
position..."

I am able to insert records to the database with Umlauts, but I use a
different method for the insert. I use the syntax of .insert(name =
value, name2 = value2,...).

I tried to encode all the data keys which are unicode objects without
success, it keeps raising the same error.

Am I missing something here, or is this a bug? And more interestingly,
how can it be solved?

Thanks,
Omri

Reply via email to