seasocks
seasocks copied to clipboard
UTF-8 support
Minified javascript files love to use UTF8 in the source,
e.g. a minified version of:
const latin_convert = {
'æ': 'ae',
'â±¥': 'a',
'ø': 'o',
'â„': '/',
'∕': '/'
};
will drop the single-quotes and store the keys as pure æ
....which requires the javascript is served as utf-8.
The current type we server "text/javascript" means users get encoding or parse errors. Maybe application/javascript will fix, but other servers will serve it with application/javascript; charset=utf-8
so maybe we need to do proper charset stuff to have this work.