DAL doesn't do any magic, it just passes along commands (that you can 
inspect in various ways, such as db._lastsql or using _select() instead of 
select()). You'll have to fiddle with your own database collation to make

SELECT field
FROM table
WHERE LOWER(field) LIKE '%whatyouwant%'

returns the resultset you want.


On Friday, September 26, 2014 6:14:13 AM UTC+2, Vladimir Makarov wrote:
>
> *For cyrillic types I mean for example words in russian language.*
>
> On Thursday, September 25, 2014 9:44:31 PM UTC+3, Niphlod wrote:
>>
>> what do "cyrillyc types" mean ? 
>>
>> On Thursday, September 25, 2014 8:27:55 PM UTC+2, Vladimir Makarov wrote:
>>>
>>> Give me a clue of how to set my search case insensitive for all kind 
>>> types?!?
>>>
>>> def search():
>>>     lname = request.vars.name #form field
>>>     q = db.tbl.l_name.like('%'+str(lname)+'%', case_sensitive=False)
>>>     grid = _grid(q)
>>>     return locals()
>>>
>>> This grid returns me all records regardless of case: Black, bLack, blacK 
>>> etc.
>>> But if I use for example cyrillic types grid returns case sensitive 
>>> result.
>>>
>>> I've tried contains method:
>>> rows = db(db.tbl.l_name.contains(lname)).select()
>>> - same result.
>>>
>>> Is there some magic pie of code to settle the problem?
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to