Re: Firefox bug: "Worker" load ignores Content-Type version parameter

On Fri, 18 Nov 2011 13:22:42 +0100, Julian Reschke <julian.reschke@gmx.de>  
wrote:

> On 2011-11-18 13:03, Simon Pieters wrote:
>> UTF-8-only for workers is deliberate. I don't see any reason to reject
>> scripts that have other charset. Rejecting the script would mean that
>> some authors can't use workers at all because their server uses charset
>> and they can't change it.
>
> What kind of server sets a charset on JS *and* cannot be configured not  
> to?

I don't know. I know we changed appcache to not do MIME type checking of  
the cache manifest because authors had trouble changing it. I know we  
sniff text/plain; charset=iso-8859-1, text/plain; charset=ISO-8859-1 and  
text/plain; charset=UTF-8 because it's the default in some servers.

> And, if this is the case, isn't this a good reason to actually require  
> that the charset is handled correctly?

For new features, we try to force UTF-8 (e.g. cache manifest, WebVTT,  
workers).

> I really believe that piling up workarounds and inconsistencies like  
> these makes the whole platform much harder to use than necessary.

Just use UTF-8. If you can't use UTF-8 in your workers, use ASCII and  
character escapes. AFAIK there's have been no requests to support legacy  
encodings in workers in Opera.

-- 
Simon Pieters
Opera Software

Received on Friday, 18 November 2011 12:43:07 UTC