Skip to content

fix: improve encoding correctness and update README#36

Merged
Borewit merged 1 commit intomasterfrom
fix-most-issue-exodus
Mar 11, 2026
Merged

fix: improve encoding correctness and update README#36
Borewit merged 1 commit intomasterfrom
fix-most-issue-exodus

Conversation

@Borewit
Copy link
Copy Markdown
Owner

@Borewit Borewit commented Mar 11, 2026

Fix multiple UTF-8, UTF-16LE, and Windows-1252 correctness issues reported by @ChALkeR.

Highlights:

  • UTF-8: proper BOM handling, validation of malformed sequences, replacement with U+FFFD, correct handling of lone surrogates
  • UTF-16LE: prevent emitting invalid surrogate sequences and handle odd trailing bytes
  • Windows-1252: fix incorrect handling of C1 control range mappings
  • Align fallback behavior more closely with native TextEncoder/TextDecoder

Docs:

  • Clarify README purpose as a small encoding polyfill
  • Remove misleading runtime support claims

Resolves #30 (hopefully)

Fix multiple UTF-8, UTF-16LE, and Windows-1252 correctness issues reported by
@exodus/bytes cross-testing.

Highlights:
- UTF-8: proper BOM handling, validation of malformed sequences, replacement
  with U+FFFD, correct handling of lone surrogates
- UTF-16LE: prevent emitting invalid surrogate sequences and handle odd trailing bytes
- Windows-1252: fix incorrect handling of C1 control range mappings
- Align fallback behavior more closely with native TextEncoder/TextDecoder

Docs:
- Clarify README purpose as a small encoding polyfill
- Remove misleading runtime support claims
@Borewit Borewit self-assigned this Mar 11, 2026
@Borewit Borewit added the bug Something isn't working label Mar 11, 2026
@Borewit Borewit merged commit 7776373 into master Mar 11, 2026
14 checks passed
@Borewit Borewit deleted the fix-most-issue-exodus branch March 11, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Results are inconsistent

1 participant