FYI: per IRC talk, the answer is the scripts should be using UTF-8 in the absence of explicit override. Spec likely will reflect this more cleanly at some point.<br><br><div class="gmail_quote">On Tue, Mar 17, 2009 at 11:57 AM, Dmitry Titov <span dir="ltr"><<a href="mailto:dimich@chromium.org">dimich@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi WHATWG!<div><br></div><div>I can't find place in the spec which would define the text encoding used to decode the script of the Web Worker.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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 :-)</div>
<div><br></div><div>So in the absence of HTTP header, what text encoding should be used to decode the Worker scripts, including nested Workers and importScripts(...) targets?</div><div><br></div><div>Thanks,<br></div><font color="#888888"><div>
Dmitry</div><div><br></div><div><br></div>
</font></blockquote></div><br>