Skip to content

Honor the Unicode flag for multiline YAML strings - #333

Open
wissaaamm wants to merge 1 commit into
marzer:masterfrom
wissaaamm:fix/yaml-multiline-unicode-flag
Open

wissaaamm wants to merge 1 commit into
marzer:masterfrom
wissaaamm:fix/yaml-multiline-unicode-flag

Conversation

@wissaaamm

Copy link
Copy Markdown

What does this change do?

Clearing allow_unicode_strings escapes non-ASCII characters in quoted YAML strings. Multiline values could bypass that setting through the block scalar path. For example, a value containing café, a newline, and an emoji still emitted raw UTF-8.

When Unicode is disabled, send multiline values containing non-ASCII characters through the existing quoted-scalar formatter. The regression also checks that ASCII multiline values still use block scalars and that the default Unicode output is preserved.

Is it related to an existing bug report or feature request?

Found during source review and reproduced on current master.

Pre-merge checklist

  • Read CONTRIBUTING.md.
  • Based on current master.
  • Added a regression that fails on the base revision and passes with the fix.
  • Built and ran the tests with GCC 13.3 and warnings as errors. All four available CTest entries passed. Eight locale variants were skipped because those locales were unavailable.

AI assistance was used for the investigation, patch, and tests.

This branch has not been deployed

No deployments
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.

1 participant