Handling quotes ending in exclamation or question marks [duplicate]

Possible Duplicate:
Is it correct to use “punctuation outside of the quotations”, or “inside?”

I've always had trouble dealing with quotes ending in question marks. Any solution has been awkward. What's the best way to use it? Examples (which are probably wrong):

  • Did you know how he asked me "how do you do?"?
  • After he said "Do I know you?", we hit him with some bricks.
  • "Fool!" he exclaimed.

British rules more or less follow common sense logic:

When the punctuation logically belongs inside the quote, this is where you put it. Otherwise, it shall be put outside.

Example:

“Where is the milk?” he asked his cat.

See Guardian style guide & “Quotation marks” on grammar.ccc.commnet.edu.


Here's the problem with the inside-the-quote rule. If you asking a question about a value in a data field, the question mark appears to be part of the value. For example, if you ask the question: Should the Zip Code field contain "12345?", the question mark appears to be part of the data. Data integrity would require this sentence to be: Should the Zip Code field contain "12345"? Looks funny but there you have it.


The rule I was taught is that there is one and only one punctuation mark associated with the speech fragment, and it goes inside the quotes. It doesn't matter whether it logically belongs there or not, that's where it goes. Mercifully, it seems I was taught wrong (see all the comments below), and we get to apply common sense: if the sentence would put a "stronger" punctuation mark than is part of the quote itself immediately after the quote, it goes outside the quote marks instead. So...

  • Did you know how he asked me "how do you do?"? The final question mark is wrong; the question mark in the quotes does duty both for the quoted greeting and the sentence as a whole. Yes, that means you can't tell just from the punctuation whether just the quote or both the quote and the sentence is a question. It's usually obvious from the wording, but sometimes you might need to rephrase to eliminate ambiguity.

    In this case you also need a capital 'H' on the second "how" and a comma after "me."

  • After he said "Do I know you?", we hit him with some bricks. By the same token, the comma after the quotes is wrong; the question mark does duty for it. You do, however, need a comma after "said."

  • "Fool!" he exclaimed. Spot on.

  • An extra example to illustrate dropping the punctuation from the quote: Did you hear how he said, "The door is open"? In this case the quote isn't a question itself, so the question mark doesn't belong there, but the overall sentence is a question and needs to be marked as such.