xmlrpclib.Fault: <Fault 1: "<type
'exceptions.UnicodeDecodeError'>:'ascii' codec
 can't decode byte 0xc3 in position 4: ordinal not in range(128)">

same problem ...


On Jun 7, 3:17 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> hmmm, please try
>
> bd[tab].insert(nome=u'testé')
>
> or
>
> bd[tab].insert(nome='testé'.encode('utf8'))
>
> On Jun 7, 9:49 am, Felipe <felip...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I'm having problems with UTF8 words and databases...
>
> > Now I'm using postgres with web2py. I used a xml-rpc script, just for
> > testing, to insert into a table the word 'testé', apparently
> > everything worked well, but when I try to get the info from the table
> > I receive an error, 'cant decode unicode byte ... something', so i
> > went to the postgres comand line and did
>
> > select * from table;
>
> > and i got a testÚ in the table...
>
> > the database is using correct utf8, i know that web2py is also all
> > utf8 and the xml-rpc also used utf8
>
> > here it is come source code
>
> > id = bd[tab].insert(nome='testé')
> >         try:
> >                 bd.commit()
> >                 retorno = 1
> >         except:
> >                 retorno = 0
> >         return retorno

Reply via email to