Skip to content

Conversation

@ChALkeR
Copy link
Collaborator

@ChALkeR ChALkeR commented Jan 10, 2026

Add fatal encoders for all supported multi-byte encodings except iso-2022-jp

Ref: #9

iso-2022-jp is not covered by single-char tests as it maintains complex state, so we need better tests for it

Bundle size increase is negligible

@ChALkeR ChALkeR force-pushed the chalker/encoder/1 branch 13 times, most recently from 513b90b to f7ffa3a Compare January 11, 2026 02:43
@ChALkeR ChALkeR marked this pull request as ready for review January 11, 2026 02:48
@ChALkeR ChALkeR requested a review from Copilot January 11, 2026 02:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds fatal mode encoders for all supported multi-byte character encodings except iso-2022-jp. The implementation follows the WHATWG encoding specification and includes comprehensive test coverage through WPT tests and custom test cases.

Changes:

  • Implemented multi-byte encoders (big5, euc-kr, euc-jp, shift_jis, gbk, gb18030) in fallback/multi-byte.js
  • Added public API exports in multi-byte.js and multi-byte.node.js
  • Added comprehensive test suite with roundtrip validation and edge case testing

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
fallback/multi-byte.js Core encoder implementations for all multi-byte encodings with map-based lookups and spec-compliant special case handling
multi-byte.js Public API export for createMultibyteEncoder with fatal mode support
multi-byte.node.js Node.js-specific API export matching the base implementation
fallback/multi-byte.table.js Added comment clarifying that low pointer entries are excluded from encoding
tests/multi-byte.encode.test.js Comprehensive test suite covering ASCII supersets, encoding-specific behaviors, and roundtrip validation
tests/wpt/loader.cjs Integrated encoder testing into WPT test loader with appropriate exclusions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChALkeR ChALkeR force-pushed the chalker/encoder/1 branch 6 times, most recently from 93d1287 to c1984a9 Compare January 11, 2026 06:19
@ChALkeR ChALkeR requested a review from Copilot January 11, 2026 09:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChALkeR ChALkeR force-pushed the chalker/encoder/1 branch 4 times, most recently from cdf4c38 to d0226f4 Compare January 11, 2026 12:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 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.

@ChALkeR ChALkeR merged commit 3999da9 into main Jan 11, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants