my $all = $dbh->selectall_arrayref( "SELECT ID, col_1, col_2 FROM table WHERE LOWER(col_1) LIKE ?", undef, "$searching_string%", );
Secondly, did you make sure that LOWER() works with non-ascii characters? The documentation for the function reads
"The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. The default built-in lower() function works for ASCII characters only. To do case conversions on non-ASCII characters, load the ICU extension."
Did you load the ICU extension?
Finally, you provided very little information as to what $searching_string contains. Is it decoded text or is encoded text? If it's encoded, which encoding is used? In case there's a bug in DBD::SQLite, it would also be useful to know which how is the string stored internally, UTF8=0 or UTF8=1? A good starting point would be to give the output of
use Devel::Peek; Dump($searching_string);
In reply to Re: sqlite utf lower
by ikegami
in thread sqlite utf lower
by fanticla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |