| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9ec35c0 commit 8156738
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -431,7 +431,9 @@ function makeTextDecoderICU() { | |||
| 431 | 431 | ||
| 432 | 432 | #prepareConverter() { | |
| 433 | 433 | if (this[kHandle] !== undefined) return; | |
| 434 | - const handle = getConverter(this[kEncoding], this[kFlags]); | ||
| 434 | + let icuEncoding = this[kEncoding]; | ||
| 435 | + if (icuEncoding === 'gbk') icuEncoding = 'gb18030'; // 10.1.1. GBK's decoder is gb18030's decoder | ||
| 436 | + const handle = getConverter(icuEncoding, this[kFlags]); | ||
| 435 | 437 | if (handle === undefined) | |
| 436 | 438 | throw new ERR_ENCODING_NOT_SUPPORTED(this[kEncoding]); | |
| 437 | 439 | this[kHandle] = handle; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments