Re: troubles with unicode

Oleg Broytman <[email protected]>
Newsgroups gmane.comp.python.sqlobject
Message-ID <[email protected]>
On Fri, Feb 24, 2012 at 10:33:34AM +0100, Petr Jake?? wrote:
>   File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py",
> line 1130, in _SO_selectInit
>     colValue = col.to_python(colValue, self._SO_validatorState)
>   File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/col.py",
> line 513, in to_python
>     return value.encode(dbEncoding)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in
> position 8: ordinal not in range(128)

   It seems your DB API adapter (kinterbasedb) returned unicode values.
StringCol tried to encode them to strings in dbEncoding (ascii) and
failed. Perhaps you have to set a proper dbEncoding. SQLObject 1.1 can
set one encoding per table or per connection.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            [email protected]
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.