Skip to content

fix: preserve UTF-8 HTML parser octets - #1281

Merged
fglock merged 2 commits into
masterfrom
fix/1245-html-formatter-thai-utf8
Sep 7, 2026
Merged

fix: preserve UTF-8 HTML parser octets#1281
fglock merged 2 commits into
masterfrom
fix/1245-html-formatter-thai-utf8

Conversation

@fglock

@fglock fglock commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Fixes #1245.

Summary

  • Preserve byte-string representation for HTML::Parser text slices.
  • Keep no-op HTML::Entities decoding from upgrading UTF-8 octets to Unicode.
  • Add a focused regression test covering parser callbacks and the HTML::TreeBuilder entity-decoding path.

Validation

  • make (874 unit tests)
  • make check-links
  • HTML::Formatter 2.16 t/03_text.t and t/04_md.t on JVM and interpreter backends

Keep HTML::Parser text slices and no-op HTML::Entities decoding byte-backed,
preventing HTML::Formatter from treating UTF-8 continuation bytes as whitespace.

Fixes #1245.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock marked this pull request as ready for review September 7, 2026 14:44
@fglock
fglock merged commit 012af95 into master Sep 7, 2026
2 checks passed
@fglock
fglock deleted the fix/1245-html-formatter-thai-utf8 branch September 7, 2026 15:03
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.

HTML::Formatter loses final Thai characters from UTF-8 HTML

1 participant