scholrly/lucene-querybuilder — pull request #15 by versae (2012-03-26 02:52:20+00:00)
Title: Unicode support

I tried to use the raw representation, but unfortunately I have to process user inputs in unicode, somethin like:
>>> from lucenequerybuilder import Q

>>> q = Q(r'%s' % u'mañana iré')

>>> print q
----> 1 print q
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 3: ordinal not in range(128)

So I added a __unicode__ version of __str__ to fix this. I don't know if it's the cleanest way to do it, but at least I think it works.