Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Invalid escape sequences in strings should produce an error #89

Open
AndrewSav opened this issue Apr 9, 2020 · 0 comments
Open

Invalid escape sequences in strings should produce an error #89

AndrewSav opened this issue Apr 9, 2020 · 0 comments
Labels

Comments

@AndrewSav
Copy link

AndrewSav commented Apr 9, 2020

Toml spec says:

For convenience, some popular characters have a compact escape sequence.

\b         - backspace       (U+0008)
\t         - tab             (U+0009)
\n         - linefeed        (U+000A)
\f         - form feed       (U+000C)
\r         - carriage return (U+000D)
\"         - quote           (U+0022)
\\         - backslash       (U+005C)
\uXXXX     - unicode         (U+XXXX)
\UXXXXXXXX - unicode         (U+XXXXXXXX)

Any Unicode character may be escaped with the \uXXXX or \UXXXXXXXX forms.
The escape codes must be valid Unicode scalar values.

All other escape sequences not listed above are reserved and, if used, TOML
should produce an error.

If I run the followning code:

	var data = Toml.ReadString("\"\\v\"=\"hello\"");
	Console.WriteLine(data.First().Key);

I'm not getting an error. Is this a bug?

@AndrewSav AndrewSav changed the title Invalid escape sequencies in strings should produce an error Invalid escape sequences in strings should produce an error Apr 9, 2020
@paiden paiden added the bug label Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants