Last I checked ' was not a valid HTML quoting character (but I might be incorrect or it might have changed).
Well, since HTML builds on SGML it's not clearly stated in the HTML specification, but I've seen several examples on the W3C site where ' is used to quote attribute values in HTML code. Don't know if it's been true since the first version, though, but in reality I've never had a problem with it.
Just insert them verbatim, no quoting needed.
Take the Euro character as an example. "\x20AC" is what I'd use today, but that wouldn't work. True wide-string doesn't work well with tools such as mail, cvs, diff etc so that's not an option either. UTF-8 escaping is even less of an option due to more non-printing characters.
/ Jonas Walldén
Previous text:
2003-09-22 23:47: Subject: Re: wish: string with other quoting then \
The last comment is one thing I often wonder about. Why do people write "<foo xyz="bla"/>" when "<foo xyz='bla'/>" works just as well? No need to quote at all.
Change XML to HTML. Last I checked ' was not a valid HTML quoting character (but I might be incorrect or it might have changed).
For example, what would the interpretation of this be (note the space at the end of the first line)?
It would be a syntax error since there's no ending separator. It has to start first in the line. Also I'd think that the first and last newlines are thrown away.
string s = #multiline __blah foo __blah;
Is it "foo", " \nfoo\n ", "foo\n " or perhaps illegal? The suggestion also doesn't handle non-printing characters (e.g. non-breaking space) or wide-string characters which normally are entered using quoting. It would be terribly frustrating to find a block of multiline text and not be able to add the characters I want without rewriting all of it!
Just insert them verbatim, no quoting needed. Or that would be the idea at least (of course, non-breakable space would be impossible to see, so it might be quite annoying).
/ David Hedbor