We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23fed09 commit 329b8edCopy full SHA for 329b8ed
fallback/multi-byte.js
@@ -86,17 +86,17 @@ const mappers = {
86
let i = start
87
88
if (lead && i < end) res += decodeLead(arr[i++])
89
+ if (lead && i < end) res += decodeLead(arr[i++]) // could be two leads, but no more
90
while (i < end) {
91
const b = arr[i++]
- if (lead) {
92
- res += decodeLead(b)
93
- } else if (b < 128) {
+ if (b < 128) {
94
res += String.fromCharCode(b)
95
} else if ((b < 0xa1 && b !== 0x8e && b !== 0x8f) || b === 0xff) {
96
res += String.fromCharCode(err())
97
} else {
98
lead = b
99
if (i < end) res += decodeLead(arr[i++])
+ if (lead && i < end) res += decodeLead(arr[i++]) // could be two leads
100
}
101
102
0 commit comments