[Webkit-unassigned] [Bug 137756] WKWebView: JavaScript fails to load, apparently due to decoding error

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 16 00:15:05 PDT 2014


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


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
          Component|JavaScriptCore              |WebKit2
                 CC|                            |ap at webkit.org




--- Comment #4 from Alexey Proskuryakov <ap at webkit.org>  2014-10-16 00:14:59 PST ---
What happens here is that when you call -[WKWebView loadHTMLString:baseURL:], the string is a UTF-16 one, and thus the document has UTF-16 encoding (which is the right thing to happen, because transport encoding takes precedence over meta charset). And then the JS resource inherits an encoding from the main document.

To fix this, you need to specify subresource encoding explicitly. The best way to do this is via Content-Type response header field.

-- 
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