26

I noticed that when quote marks are converted to smart quotes in titles, the opening quote points the wrong way if it is preceded by an open parenthesis. See the title to this question.

http://img264.imageshack.us/img264/461/backwardsquote.png


Edit: Thanks for checking on different browsers, but it's not a browser issue. Just look at the HTML that is served:

Smart quotes in parentheses point the wrong way (”example”)

The one on the left should be “


Edit 2: looks like [ and { are also triggering the wrong type of quote.

4
  • 21
    BTW, am I the only one who thinks that Smart Quotes on any Programming sites are evil and bad, just like converting the - into a long Hyphen in Word is also evil and bad? Commented Jan 5, 2010 at 20:57
  • 7
    @Michael Stum: it's not that bad since it is only done in the titles here. the question text is nothing but dumb quotes, unless you put in your own smart quotes.
    – Kip
    Commented Jan 5, 2010 at 22:07
  • 1
    It is amazing to me that this post continues to get a trickle of upvotes... it has been fixed for months, why do people keep finding it?
    – Kip
    Commented Jun 14, 2010 at 13:14
  • This small problem still applies to How can I use my 3.5“ disk drive without having to insert a floppy in my 5.25” drive as well? (Which, for that post I fixed by typing the curly quotes manually, while in the example in this comment I manually inserted the wrong curly quotes that the site would otherwise show.)
    – Arjan
    Commented Oct 16, 2010 at 16:23

2 Answers 2

0

Yes, this was a relatively silly oversight on my part -- fix will go out tomorrow evening PST.

Note that the fancy entities code (for post titles only, of course) is based on a simplified subset of SmartyPants.

  • Straight quotes (' and ") into “curly” ‘ and “ entities
  • Dashes (-- and ---) into &emdash; entity
  • Three consecutive dots (...) into … entity

It's simpler because we don't have to deal with HTML in titles.

Never simple enough that I can't get it wrong, of course... Try your hand at this one:

Why does TextMate always complain 'Can't find string terminator '"'' when  
it runs a Perl script?
1
  • 3
    Shouldn't two dashes be transformed into an n-dash ( , –), which is slightly longer than a hyphen but shorter than an m-dash?
    – royhowie
    Commented Jun 21, 2015 at 2:53
21

Smart quotes in parentheses point the way least likely to be correct, certainly. There are probably other previous-characters like the other bracket types and and themselves that should also be considered for triggering a left-quote.

But auto-smart-quote-ification is in general bogus: there's no way it can always guess the right direction. Indeed, often I don't want a smart quote at all — if I'd wanted a ‘smart quote’ I would have typed it directly.

I would like to see automatic smart quotes disappear from SO, MS Office, and the face of the Earth. Can you arrange that? Thanks then!

5
  • The syntax highlighting also cannot always guess correctly, yet we find it useful and worth keeping. The same rationale applies here, IMHO.
    – Gnome
    Commented Jan 6, 2010 at 3:29
  • You can make them disappear from MS Office. (at least, your copy of it.) It's in the options somewhere.
    – Kip
    Commented Jan 6, 2010 at 4:03
  • i checked with [ and { and those are giving the wrong quotes. i can't think of any other characters that would almost always require a left smart quote.
    – Kip
    Commented Jan 6, 2010 at 4:09
  • 2
    @Roger: the syntax highlighting adds information; the smarter changes information. There's semantic differences between , and " which I might not want to lose. And it is possible to type the different quotes if we want them, unlike the different colours. (It's a pity most keyboard layouts don't make it easy though.). @Kip: yeah, there are a few if you go into the less-likely realms of Unicode.
    – bobince
    Commented Jan 7, 2010 at 16:22
  • 1
    "Can you arrange that?" I don't know, why don't you ask your friend Cthulhu? Commented Jan 11, 2010 at 9:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .