|
From: Felix <fel...@te...> - 2006-05-30 22:01:44
|
Thanks Max !!! it's surely help me a lot On Sun, 28 May 2006 21:20:11 +0300 "Max Ischenko" <isc...@gm...> wrote: >=20 > http://maxischenko.in.ua/blog/entries/89/sqlobject-unicode-and-ascii-erro= r/ >=20 > HTH, > Max. >=20 > > Hi !! what happens here ?? > >=20 > > class Table(SQLObject): > > class sqlmeta: > > fromDatabase=3DTrue > >=20 > > name =3D StringCol() > >=20 > > Now, This works: > > var =3D '=F1' > > Table(name=3Dvar) > >=20 > > But this doesn't works: > > var =3D u'=F1' > > Table(name=3Dvar) > >=20 > > with this traceback: > > Traceback (most recent call last): > > File "<stdin>", line 1, in ? > > File "/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlo= bject/main.py", > > line 1183, in __init__ > > self._create(id, **kw) > > File "/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlo= bject/main.py", > > line 1207, in _create > > self.set(**kw) > > File "/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlo= bject/main.py", > > line 1068, in set > > kw[name] =3D dbValue =3D from_python(value, self._SO_validatorState) > > File "/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlo= bject/col.py", line > > 498, in from_python > > return value.encode("ascii") > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in pos= ition 0: ordinal not in > > range(128) > >=20 > > I need to store unicode strings what can i do ? > =20 >=20 >=20 >=20 > ------------------------------------------------------- > All the advantages of Linux Managed Hosting--Without the Cost and Risk! > Fully trained technicians. The highest number of Red Hat certifications in > the hosting industry. Fanatical Support. Click to learn more > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=107521&bid$8729&dat=121642 > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss |