[Webkit-unassigned] [Bug 13138] StringImpl::isLower calls |islower| for non-ASCII characters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 24 19:47:15 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13138


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1




------- Comment #5 from darin at apple.com  2007-03-24 19:47 PDT -------
(In reply to comment #4)
> (From update of attachment 13799 [edit])
> this patch 'fixes' both isLower and lower. 
> 
> This is still broken for non-BMP characters, though. We may just consider
> calling the corresponding ICU functions because ICU folks must have done a good
> job at both optimization and 'correctness'. 

There are two different operations. One is "is lowercase". For that we should
use the Unicode functions in WTF, which call through to ICU.

The other is "is lowercase ASCII". There are lots of places that need this
operation. I believe that if you look at the clients of StringImpl::isLower
you'll see that "is all lowercase ASCII" is what almost all those clients want.
So we might want to rename it. There's no reason to use the more-general much
slower "is lowercase" operation.

Contrary to what you say here, the ICU "islower" operation is much much slower
and shows up on profiles when we use it excessively.

Now as to the misuse of <ctype.h>, it's true, there's a lot of code that calls
<ctype.h> and expects non-standard behavior of returning false for non-ASCII
characters. We should fix all of that code. Not just StringImpl::isLower.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list