File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const mappers = {
3333 const b = arr [ i ++ ]
3434 if ( b < 128 ) {
3535 res += String . fromCharCode ( b )
36- } else if ( b < 0x81 || b === 0xff ) {
36+ } else if ( b === 0x80 || b === 0xff ) {
3737 res += String . fromCharCode ( err ( ) )
3838 } else {
3939 lead = b
@@ -248,8 +248,8 @@ const mappers = {
248248 if ( b <= 0x80 ) {
249249 res += String . fromCharCode ( b ) // 0x80 is allowed
250250 } else if ( b >= 0xa1 && b <= 0xdf ) {
251- res += String . fromCharCode ( 0xff_61 - 0xa1 + b )
252- } else if ( b < 0x81 || ( b > 0x9f && b < 0xe0 ) || b > 0xfc ) {
251+ res += String . fromCharCode ( 0xfe_c0 + b )
252+ } else if ( b === 0xa0 || b > 0xfc ) {
253253 res += String . fromCharCode ( err ( ) )
254254 } else {
255255 lead = b
@@ -372,7 +372,7 @@ const mappers = {
372372 const b = arr [ i ++ ]
373373 if ( b < 128 ) {
374374 res += String . fromCharCode ( b )
375- } else if ( b < 0x81 || b === 0xff ) {
375+ } else if ( b === 0x80 || b === 0xff ) {
376376 res += String . fromCharCode ( err ( ) )
377377 } else {
378378 lead = b
You can’t perform that action at this time.
0 commit comments