[Webkit-unassigned] [Bug 92872] A smart util class that grabs latin1 string from a WTF::String

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 1 11:06:38 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=92872





--- Comment #2 from Michael Saboff <msaboff at apple.com>  2012-08-01 11:06:39 PST ---
It seems to me that the only case you always want a const char* that is Latin 1 is for debugging or logging. If the string is a 16 bit string, then there is loss of data calling String::latin1().

For the performant cases of handling strings, you need to do the is8Bit() check and then handle the 8 and 16 bit cases separately.

Therefore use str.latin1.data() for those debug / logging cases.

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



More information about the webkit-unassigned mailing list