[Webkit-unassigned] [Bug 184444] [GTK] webkit_web_view_load_html() garbages linked CSS content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 18 09:19:31 PDT 2018


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

--- Comment #6 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Hmmm... gchar* strings are always UTF-8 in GLib APIs, always, that's a GLib convention, not a WebKit convention. So WebKit treats it as such, and the caller is responsible for converting to UTF-8 before calling webkit_web_view_load_html() or webkit_web_view_load_plain_text().

This usually works, because applications can usually assume that files on disk are always UTF-8. But it breaks down badly for HTML and CSS files with WebKit. We have the WebKit API assuming the input is UTF-8 and converts from UTF-8 unconditionally. But then it goes ahead and treats it as ISO-8859-1 by default, or whatever other encoding is specified in WebKitSettings. And WebKit uses UTF-16 for everything internally (WTF::String), so if anything is being treated as UTF-16, that's probably a bug related to a missing conversion somewhere.

So while on one hand, it seems natural that input should be UTF-8, it does seem more than a little unfriendly to ignore the default encoding that was set with WebKitSettings. Carlos, what do you think?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180418/7dd6d78c/attachment-0001.html>


More information about the webkit-unassigned mailing list