seasocks icon indicating copy to clipboard operation
seasocks copied to clipboard

UTF-8 support

Open mattgodbolt opened this issue 1 year ago • 0 comments

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.

mattgodbolt avatar Jul 14 '23 15:07 mattgodbolt