You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: the TOML reader refuses the \u, \U, \b and \f escapes of a basic string #865
The same happens for \U0001F600, \b and \f. All four are valid escapes in a TOML 1.0 basic string, and so the manifest above is valid TOML.
mcpp.libs.toml (modules/libs/src/toml.cppm) accepts only \n, \t, \r, \", \\ and \0. The same switch is duplicated in read_string and read_multiline_string, so both single-line and multi-line basic strings and quoted keys refuse these escapes. The parser reads mcpp.toml, mcpp.lock, the configuration files and template metadata, so any of them written with a Unicode escape (often by a tool that ASCII-escapes non-ASCII text) cannot be loaded.
Expected
The parser reads every escape TOML 1.0 defines: \b, \t, \n, \f, \r, \", \\, \uXXXX and \UXXXXXXXX. A Unicode escape gives UTF-8 bytes. An escape that does not name a Unicode scalar value (a surrogate, a value above U+10FFFF, or too few hex digits) is refused with a message that names it.
Actual
invalid escape '\u' (or '\U', '\b', '\f') and the file is not read.
Activity
fix: the TOML reader accepts every escape TOML 1.0 defines (mcpp-comm…