[EMAIL PROTECTED]:~$ python Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from sqlobject import * >>> >>> sqlhub.threadConnection = connectionForURI('sqlite:/:memory:') >>> >>> class Person(SQLObject): ... name = UnicodeCol() ... >>> Person.dropTable(ifExists=True) >>> Person.createTable(ifNotExists=True) >>> >>> p = Person(name=u'\u20ac') # \u20ac is the 'Euro symbol'. >>> persons = Person.select(LIKE(Person.q.name, u'\u20ac')) >>> person = persons[0] >>> print person.name.encode('utf-8') €
On 4/24/07, Markus Gritsch <[EMAIL PROTECTED]> wrote: > Hi all, > > can some people on this list please be so kind and run the following > short program and confirm that it works or send the traceback in case > of any? It is self-contained and does not require any further setup. > > Thanks in advance, > Markus > > > from sqlobject import * > > sqlhub.threadConnection = connectionForURI('sqlite:/:memory:') > > class Person(SQLObject): > name = UnicodeCol() > > Person.dropTable(ifExists=True) > Person.createTable(ifNotExists=True) > > p = Person(name=u'\u20ac') # \u20ac is the 'Euro symbol'. > persons = Person.select(LIKE(Person.q.name, u'\u20ac')) > person = persons[0] > print person.name.encode('utf-8') > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > sqlobject-discuss mailing list > sqlobject-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss