Do you have a question? Post it now! No Registration Necessary. Now with pictures!
August 17, 2009, 1:40 pm
rate this thread
According to <http://area51.phpbb.com/docs/coding -
guidelines.html#charsets>, "case insensitive comparison of strings is
no longer possible with strtolower or strtoupper as some characters
have multiple lower case or multiple upper case forms depending on
their position in a word." The article goes on to say that you should
use case folding to make sure you have a case insensitive version of a
Will PHP6 support case folding? Does mb_convert_case() support this
functionality? php.net says that it has three modes - MB_CASE_UPPER,
MB_CASE_LOWER, or MB_CASE_TITLE, however, phpBB's utf8_case_fold_nfc()
implementation does not use any mb_* functions in utf_tools.php.
Also, what if one wanted to do a case insensitive search in SQL? If
strtoupper doens't work it seems like SQL's UPPER() wouldn't work,
either, although maybe x consecutive UPPER()'s would work?
MySQL has the function STRCMP(), which might work depending on how
MySQL determined what was a binary string and what was a UTF8 encoded
string, but that, I suspect, is not cross database compliant.
- C. (http://symcbean.blogspot.c
August 18, 2009, 12:14 pm
Re: utf8 case folding questions
Because the mbstring package is optional in PHP and they've obviously
coded to avoid problems when its not installed.
Yes it should - but this is somewhat off topic here. RTFM for more
No it won't.
It should be fairly portable if you cast the types correctly, although
ISR that charset conversions are not covered by SQL92.