[Webkit-unassigned] [Bug 7582] c_utility.cpp contains platform dependant code

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sat Mar 4 12:16:10 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7582





------- Comment #4 from darin at apple.com  2006-03-04 12:16 PDT -------
(From update of attachment 6832)
I just read Alexey's comments, he makes some good points:

    1) Are we sure that Latin-1 has no holes in ICU? We need to make sure of
this. These holes have caused actual incompatibilities with plug-ins recently,
so it's not just a theoretical issue.
    2) It's not a good strategy to post-process to look for the replacement
character as a way to detect failure.

I'm not sure that I agree that writing custom code would increase
maintainability. But I agree that if this code ends up being hot, it's going to
be pretty slow to do a ucnv_open every time. We've seen that be a problem
before.

Given that, I think we should consider custom code, especially for the Latin-1
to UTF-16 case.

As far as the UTF-8 to UTF-16 case, I'm not quite as sure that we need custom
code. But it would be nice to not have to forbid the replacement character. If
we stick with ICU, we can use ucnv_setFromUCallBack to control ICU's behavior.
But since the UTF-8 to UTF-16 conversion is pretty simple, maybe we should do
it ourselves as Alexey suggests instead of calling the general character
conversion library.


-- 
Configure bugmail: http://bugzilla.opendarwin.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