See bug 24150 for more info. In short, Workers treat all URLs in them as UTF-8 and set 'default' encoding of all scripts to UTF-8, so there is no need to 'inherit' the text encoding from the 'parent context'. Relevant WHATWG discussions: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018874.html http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018726.html
Created attachment 28803 [details] Proposed patch
Comment on attachment 28803 [details] Proposed patch > + m_cachedScript = document->docLoader()->requestScript(m_scriptURL, UTF8Encoding().name()); The name is "UTF-8", there is no need to get it in such a roundabout way. > + m_decoder = TextResourceDecoder::create("text/javascript", UTF8Encoding().name()); Ditto. r=me
Replaced the name pulling with "UTF-8" and landed: http://trac.webkit.org/changeset/41871