Multi-Byte characters getting mangled.
Status: Beta
Brought to you by:
danda
Today, I noticed mangled text on my page. It turns out that I used multibyte characters in strings in my UTF-8 encoded Javascript files, and they were not preserved by jscompact.
"übertragen" was changed to "\xC3\xBCbertragen". I changed "übertragen" to "\u00FCbertragen" and everything was fine. But I would rather not do this for maintenance reasons.
Logged In: YES
user_id=49025
Originator: NO
Spidermonkey does not seem to offer any way to control this escaping behavior for utf-8 encoded strings.
It should be noted though that the escaped strings it emits are correct. If you run the string "\xC3\xBCbertragen" through the js interpreter in a print statement, it will print "übertragen" as desired.
Marking wont't fix, as spidermonkey doesn't offer control over this, and the generated scripts do produce correct output when run.