Skip to content

json parser fails to handle non-BMP unicode escapes #139

Open
@ohmyarch

Description

@ohmyarch
#include <cpprest/json.h>

int main(int argc, char *argv[]) {
    ucout << web::json::value::parse(U("{\"test\":\"\\ud83c\\uddee\\ud83c\\udde9\"}"))
                 .at(U("test"))
                 .as_string()
          << std::endl;
}

terminate called after throwing an instance of 'std::range_error'
what(): UTF-16 string is missing low surrogate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions