tags:

views:

311

answers:

6

I like to save local copies of useful text-heavy pages from the 'Net so I can practice improving their appearance by modifying the markup to include CSS. (What can I say ... It keeps me off the streets)

I've noticed that text on the pages is often delimited by ` and '. See the blockquoted example below.

Is there a good reason for this? I'd like to do my modifications automatically with a script if I thought these quotes were there for a good reason. Is it, for example, a byproduct of a particular authoring tool?

I have tried to search for this, but search engines treat it like empty or incomplete strings and don't give meaningful results.

EDIT: A single quote example (` ') can be found in Eric Raymond's Cathedral and the Bazaar

The problem was this: suppose someone named `joe' on locke sent me mail. If I fetched the mail to snark and then tried to reply to it, my mailer would cheerfully try to ship it to a nonexistent `joe' on snark. Hand-editing reply addresses to tack on `@ccil.org' quickly got to be a serious pain.
A: 

I think this is an artifact of your editor -- perhaps you have smart quotes turned on. Strings in HTML are delimited by either a pair of single- or double-quotes, not smart quote characters.

tvanfosson
No I'm using vim. The funny quotes are in the files as they are downloaded.
pavium
+5  A: 

HTML doesn't. Only ' and " characters may be used to delimit attribute values (which are the only strings that can be delimited in HTML).

People writing text (which happens to be marked up with HTML) may use “,”,‘ and ’, but that is just writing using quote marks.

David Dorward
I'm not thinking of attribute values, but quoted strings in the text of the webpage.
pavium
Then that is just people using appropriate characters for writing quoted material instead of the simple straight quote marks found in plain ASCII.
David Dorward
But I've seen it so often, and apparently by people who would know better (Eric Raymond??), that I really wondered if some kind of authoring software was responsible.
pavium
According to published HTML standards, you're correct. But IE allows backtick delimited attributes, e.g., <a href=`...`>. Probably only of interest if you're writing tolerant parsers, escaping library functions, or malicious content filters.
Mike Samuel
A: 

Neither HTML4 nor HTML5 allow curly quotes as attribute value delimiters in the markup. Searching for "curly quotes html" in search engines throws up a few pages, the first of which Curling Quotes in HTML, XML and SGML describes some tools to remove erroneous quotes, which is the opposite of what you ask for but the right thing to do with such files.

Your comment indicates that you mean having backtick and quote in the text, rather than in the markup. This was a fairly common style on usenet back in the day, as backtick is ASCII but curly quotes aren't. To insert a backtick into your text, press the backtick key on your keyboard when typing it in.

Pete Kirkham
Sorry about the curly quotes in the title of the question. They were added by SO's software. I'm not complaining about curly quotes (although someone should)
pavium
+2  A: 

This style of quote marks has been an (note: not the only) accepted style of quoting in plain text files since before the web. This is nothing to do with html specifically --- it is acceptable in html text files, but predates html.

Dave Hinton
+2  A: 

This:

suppose someone named `joe'

is a visual affectation for smart quotes that works in ASCII-only environments.

I personally wouldn't recommend it at all. ` is not an open-quote, it's a grave accent, and the resulting lop-sided look of the quotes is, to my tastes, worse than just using 'straight quotes'. ``Double faux-quotes" are even uglier.

You'll find some Germans type faux-smart-quotes using both the grave and acute accent characters: `like this´. This is not ASCII-compatible (it uses an ISO-8859-1 extended character) and it's still quite ugly, but they do it because the accent characters are present on the German keyboard layout, making them easy to type. (And they don't know any better.)

Really we should have proper ‘smart quotes’ available “on the keyboard” for «direct» typing. That would solve these problems and banish bogus auto-smart-quote features — including the silly StackOverflow feature that messed up your question title — back to the bitbucket where they belong. (Though actually... I already have.)

bobince
I think they're ugly too. That's why I try to get rid of them, and I'm wondering who uses them in the first place, and why?
pavium
People who wanted to do smart quotes way back before there was a reliable way of rendering smart quotes. And idiots, of course. Never underestimate the power of idiots.
bobince
I think there is a severe dissociation of online publishing and desktop publishing. While I appreciate typographically correct quotes in printed documents (and hence, in word processors), I find them more than annoying when they are used online. I have a feeling that people try to be smart or simply just "different" by using them, and like apostrophes, the vast majority just gets it horribly wrong.
Tomalak
+4  A: 

The example of Eric Raymond’s essay is a typical example of people from pre-Unicode eras trying to “improve” the typograph of their text by using conventions that no longer hold. The quoting style `' is typical of that. It’s also used in LaTeX (which automatically converts it to correct typographical single quotes ‘’).

You can see other ASCII artifacts in Eric’s essay, too: for example, he uses “--” instead of a “correct” dash “” (an awful lot of people do this, since the dash doesn’t exist on default Windows keyboards).

As such, it’s an anachronism from a time where support for Unicode fonts (or generally: fonts lacking these typographical features) wasn’t widespread.

Konrad Rudolph
It's true, the pages I've seen this in would tend to be the older ones, or derived from older texts.
pavium
+1 for a great explanation!
Moayad Mardini
pavium, because it's true, you should mark it as answer.
Moayad Mardini
It's my favourite answer so far ... but it's late here. I'll come back to it in the morning.
pavium