Why `escapeSequence()` treat characters whose charCodes is under 256 as ascii, not utf-16?
Closed this issue · 4 comments
yichung279 commented
In escapeSequence()
,characters whose charCodes is under 256 will turn into ascii code.
However, it works well if we treat it as utf-16. Both "\141"
and "\u0061"
represent "a"
.
Lines 232 to 240 in 94c3835
Is
if (cc < 256) {
return '\\' + cc.toString(8);
}
a necessary statement?
yichung279 commented
If it is not necessary, I remove it in #116
frobinsonj commented
hazzik commented
This was done to optimize the length of resulting code
yichung279 commented
Oh, I see. What a great work!