Skip to content

\_ as NBSP support #1343

@pavelalexeenko

Description

@pavelalexeenko
YAML::Node node = YAML::Load("{text1: \"Hello\u00A0World\", text2: \"Hello World\", text3: \"Hello\\_World\"}");

std::string text1 = node["text1"].as<std::string>();
std::string text2 = node["text2"].as<std::string>();
std::string text3 = node["text3"].as<std::string>();

These 3 texts should all be the same according to YAML standard, but they are not. Checkout Escape codes section. Backslash with underscore should be equal to NBSP
http://yaml.org/refcard.html

text1 = "Hello World"
text2 = "Hello World"
text3 = "Hello\xa0World"

Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions