Closed Qix- closed 5 years ago
Could this be related to how emjois are treated in javascript strings? https://github.com/orling/grapheme-splitter.
I haven't noticed a problem when working with Surplus, though. I tried using Firefox's dev tools to look at the source for a JS file that used your emoji snippet and it didn't notice anything odd about the encoding. It displayed without any trouble in Firefox, too.
Surplus is just using Javascript's standard Unicode strings, so there shouldn't be an issue internally, but who knows?
Your example appears to work running in a browser: Surplus issue #79
What's your build setup? Webpack with surplus-loader or something else? I wonder if your text encoding is being messed up somewhere.
Rollup in this case. I can see if it's another plugin doing the mangling, I'm not near a computer at the moment.
Going to assume it's rollup again - Parcel has no problem with this.
It appears as though emojis (and I would imagine other higher Unicode characters) are not being encoded correctly.
appears to get encoded down to: