rtsao / css-to-js-sourcemap

Generates CSS w/ sourcemaps to lines in JS at runtime
MIT License
8 stars 4 forks source link

Fix handling of unicode in source code #21

Closed rtsao closed 5 years ago

rtsao commented 5 years ago

This PR prevents errors when source code contains unicode strings:

Uncaught DOMException: Failed to execute 'btoa' on 'WorkerGlobalScope': The string to be encoded contains characters outside of the Latin1 range.

See: https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem