Skip to content

Document custom XML entities and character encodings - #138

Merged
zhengchun merged 1 commit into
antchfx:masterfrom
Sinkleberg:codex/xml-character-entities
Oct 10, 2026
Merged

zhengchun merged 1 commit into
antchfx:masterfrom
Sinkleberg:codex/xml-character-entities

Conversation

@Sinkleberg

Copy link
Copy Markdown
Contributor

Explain the difference between non-ASCII XML characters, numeric references, custom named entities, and byte encodings. The guide shows DecoderOptions.Entity with explicit strict validation, plus how to retain charset decoding when supplying decoder options.

A runnable example checks the documented output, ordinary/numeric Unicode input, unknown entities, malformed XML, and a Latin-1 document with a custom entity. This documents existing behavior; it does not change the parser.

Refs #118.

The example passes on the unchanged parser base. go test . -v -cover -p 2 passes locally on Windows/Go 1.27.1 with 89.5% statement coverage. The CI Go 1.23/1.24 and other OS combinations were not run locally.

@zhengchun
zhengchun merged commit 84cdd71 into antchfx:master Oct 10, 2026
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