2 messages in com.googlegroups.pylons-discussunicode problem
FromSent OnAttachments
Julien Cigar20 Dec 2007 02:52 
Ben Bangert20 Dec 2007 11:28 
Subject:unicode problem
From:Julien Cigar (jcig@public.gmane.org)
Date:12/20/2007 02:52:40 AM
List:com.googlegroups.pylons-discuss

Hello all,

I use Pylons 0.9.6 with SQLAlchemy 0.4.1 and Genshi 0.4.4

I have a strange unicode dilemma ... : - either I set sqlalchemy.convert_unicode = true in my configuration file and url_for fails with : exceptions.Exception: url_for can only return a string or None, got unicode instead: /ias/pics/published.png - either I don't set sqlalchemy.convert_unicode and then Genshi fails with : exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)

Any idea how could I resolve this (other than str() everything in my template files ..) ?

Thanks, Julien