Skip to content

Fix YAML output escaping emoji and supplementary-plane Unicode (#437)#549

Open
TomWright wants to merge 2 commits into
masterfrom
fix/437-yaml-unicode-emoji
Open

Fix YAML output escaping emoji and supplementary-plane Unicode (#437)#549
TomWright wants to merge 2 commits into
masterfrom
fix/437-yaml-unicode-emoji

Conversation

@TomWright
Copy link
Copy Markdown
Owner

@TomWright TomWright commented May 22, 2026

Post-process yaml.Marshal output to unescape \UNNNNNNNN sequences back to UTF-8 for supplementary-plane characters (U+10000–U+10FFFF). The upstream yaml library's isPrintable does not handle 4-byte UTF-8, causing all such characters to be escaped.

Fixes #437

TomWright added 2 commits May 22, 2026 12:14
Post-process yaml.Marshal output to unescape \UNNNNNNNN sequences back
to UTF-8 for supplementary-plane characters (U+10000–U+10FFFF). The
upstream yaml library's isPrintable does not handle 4-byte UTF-8,
causing all such characters to be escaped.
@ccoVeille
Copy link
Copy Markdown

Hi @TomWright

go-yaml maintainer here (cc @ingydotnet)

If you found an issue with the go-yaml library, please open an issue for it on the go-yaml repository

@TomWright
Copy link
Copy Markdown
Owner Author

Thanks @ccoVeille, I've raised an issue here: yaml/go-yaml#354

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.

Emoji is changed to Unicode in yaml

2 participants