Merged
Conversation
This fixes the example "Example 5.13 Escaped Characters" from the YAML specification. The example demands that `\_` is being translated to unicode `\u00a0`. The unicode codepoint `\u00A0` encoded for utf-8 in hex is `\xC2\xA0`. Fixing this test case will cause the unit test to not pass, since the codepoint `\u00A0` is not handled correctly. (Failing unittest is expected).
b0aa6c9 to
ab33fb5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes PR #1347.
Parsing a scalar type (string) with the content
\_should result in a string with the unicode codepoint0x00A0representing a Non-Break Space (NBSP). This results in a utf-8 encoding of two bytes0xC2 0xA0. See Example 5.13 in the yaml specification (https://yaml.org/spec/1.2.2/#56-miscellaneous-characters).The test are faulty implemented and check only for a
0xA0code point. Similarly, the parser converts it only to a single0xA0byte.There are two commits: