Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

parse_options::allow_invalid_utf16
PrevUpHomeNext

Non-standard extension option.

Synopsis
bool allow_invalid_utf16 = false;
Description

Allow invalid UTF-16 surrogate pairs to appear in strings. When enabled, the parser will not strictly validate the correctness of UTF-16 encoding, allowing for the presence of illegal leading or trailing surrogates. In case of invalid sequences, the parser will replace them with the Unicode replacement character.

Remarks

Enabling this option may result in the parsing of invalid UTF-16 sequences without error, potentially leading to the loss of information.


PrevUpHomeNext