From: William S. <sp...@rh...> - 2011-10-31 21:14:43
|
I think this is an interesting idea, and did not realize that backslash was allowed outside quotes in YAML. The big problem is that by not allowing quotes it also means the backslash sequence must be used for a lot of valid UTF-8 as well. Whitespace and quotes would have to be replaced with unreadable \xNN substitutes. All YAML delimiters would have to be replaced with unreadable substitutes unless the parser is altered so things like "\," are preserved. "\\" however would work, interestingly enough. Interpreters will need to check if the input is quoted, not all YAML api's provide this. This is needed or just quoting would quadruple the number of backslashes and no error is produced by YAML if this is not done. It may also be necessary to implement all YAML escapes such as "\b". Oren Ben-Kiki wrote: > The YAML parser will only expand \x80 if it was inside double quotes. My > example did not use double quotes: > > foo: !badstr BadName\x80 > > Which is different from: > > foo: !badstr "BadName\x80" |