feat: support other iso-8859 encodings in single-byte#14
Conversation
2ca79ea to
2048f89
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for three ISO-8859 encodings (iso-8859-1, iso-8859-9, iso-8859-11) using their official Unicode.org definitions, which differ from WHATWG's label mappings to Windows encodings.
- Implements actual
iso-8859-1(Latin-1) as a direct Unicode subset rather than mapping towindows-1252 - Adds
iso-8859-9(Turkish) andiso-8859-11(Thai) using official Unicode mappings - Splits test suite to separately verify Unicode-based and WHATWG-based encoding behavior
- Optimizes
iso-8859-1encoding/decoding with fast paths using native Latin1 operations
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/single-byte.test.js |
Adds new Unicode-based test suite alongside existing WHATWG tests; validates against official Unicode mapping tables |
tests/encoding/fixtures/unicode/ISO8859/*.txt |
Adds 16 official Unicode Consortium mapping files for ISO-8859 encodings (8859-1 through 8859-16) |
tests/encoding/fixtures/README.md |
Documents new Unicode.org fixture sources |
fallback/single-byte.encodings.js |
Refactors encoding maps to include all iso-8859-* variants (1-16); marks non-WHATWG variants |
fallback/single-byte.js |
Adds fast path for iso-8859-1 decoding using decodeLatin1() |
single-byte.js |
Adds non-WHATWG encodings to skipNative set; adds fast path for iso-8859-1 encoding |
single-byte.node.js |
Updates Node.js decoder to use latin1Slice() for iso-8859-1 |
README.md |
Documents new encodings and clarifies WHATWG vs Unicode.org differences with examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f937b54 to
13cb09e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
533bf5e to
8639a6d
Compare
8639a6d to
5f532f3
Compare
8005f55 to
7c4c44a
Compare
This brings in actual iso-8859-1 support, also iso-8859-9 and iso-8859-11
7c4c44a to
960591b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This brings in actual
iso-8859-1support, alsoiso-8859-9andiso-8859-11TextDecoder API is unchanged