W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] Text Encoding used to decode Web Worker's script.

From: Dmitry Titov <dimich@chromium.org>
Date: Tue, 17 Mar 2009 11:57:13 -0700
Message-ID: <28040fc60903171157v2dc96ebbt11ef169d28add0e9@mail.gmail.com>
Hi WHATWG!
I can't find place in the spec which would define the text encoding used to
decode the script of the Web Worker.

For example, section 4.3.1, in "runnning a script", step 2, defines that for
the <script> element - the encoding is 'inherited' from Document and can be
overridden by 'charset' attribute or HTTP header.

But for Workers, there is no specific instructions. I would assume (probably
incorrectly) that the Web Workers behave like <script> element in this
regard - so the encoding shoul dbe inherited from the 'parent Document', but
this feels contradicting the specific requirements fro URLs in Workers to be
encoded using UTF-8. It also feels the spirit of the Workers spec is leaning
to UTF-8 everywhere :-)

So in the absence of HTTP header, what text encoding should be used to
decode the Worker scripts, including nested Workers and importScripts(...)
targets?

Thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090317/22bc4a88/attachment.htm>
Received on Tuesday, 17 March 2009 11:57:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT