[web2py] Re: unicode problem in DAL

2012-03-09 Thread Phyo Arkar
Yeah , the problem is you cannot store unicode .. Its not web2py fault tho . thats how Python works. You have to Encode before storing. So here is how it works: When you read data from a source , decode. When you store data to source , encode After retrieving data from a source (File,Database)

Re: [web2py] Re: unicode problem in DAL

2011-06-01 Thread Phyo Arkar
So the value has to be Endcoded From Unicode into UTF8 before inserting? i am sure keys are str. We cannot store Unicode values ? On 5/31/11, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I am not sure there is a problem here. I cannot help without seeing an example of the data you

[web2py] Re: unicode problem in DAL

2011-06-01 Thread Massimo Di Pierro
You store unicode by passing it encoded. On Jun 1, 4:01 am, Phyo Arkar phyo.arkarl...@gmail.com wrote: So the value has to be Endcoded From Unicode into UTF8 before inserting? i am sure keys are str. We cannot store Unicode values ? On 5/31/11, Massimo Di Pierro massimo.dipie...@gmail.com

[web2py] Re: unicode problem in DAL

2011-05-31 Thread Massimo Di Pierro
I am not sure there is a problem here. I cannot help without seeing an example of the data you insert. If you do: db.table.insert(**a) a must be a dictionary with str key and str (ut8 encoded) values. You cannot have unicode field names. Massimo On May 31, 2:40 am, Phyo Arkar