Subject | Re: [firebird-python] Re: Can't search DB with accents |
---|---|
Author | Werner F. Bruhin |
Post date | 2010-09-02T18:43:15Z |
On 02/09/2010 20:31, Werner F. Bruhin wrote:
needed.
Werner
> On 02/09/2010 18:41, starglider101@... wrote:oops, remove the ".encode()" from the above print statement, it is not
>>
>>
>>
>>
>>
>>
>> I make some tests:
>> If I convert the data to PostgreSQL it works.
>> Also if I use sqlalchemy the problem persist, that concluded the problem is in the driver.
>>
>> Any ideas?
>>
>> --- In firebird-python@yahoogroups.com, starglider develop<starglider.dev@...> wrote:
>>> Hi,
>>> I'm developing a new application to store book data,
>>> my problem is when I do a search with accents like "Solidão" it gives no
>>> results.
>>> Searching a word without accents works great.
>>>
>>> Thank you in advance for your help.
> I use FB 2.1 and SQLAlchemy 0.5.8 and doing this works fine for me:
>
> aFilter = "%s LIKE '%s%s%s'" % ('winename',
> '%',
> u'Châ',
> '%')
>
>
> for instance in session.query(db.Cellarbook).filter(aFilter).all():
> print instance.winename.encode(), type(instance.winename)
needed.
Werner