Smart Quotes - Post ID 101221

User 2028027 Photo


Registered User
7 posts

I like quotation marks that bend left or right, rather than the default ambidextrous ones that you get in CoffeeCup if you just type the characters on your keyboard. You can paste bendy ('smart') ones from other programs into your page, but that's a bit of a no-no, since HTML isn't yet very aware of multi-byte characters. Doing so will fail validation.

Of course, you can type the proper HTML codes for the quotes straight into your web page—if you can remember them! Unfortunately, they're not contained in CoffeeCup's 'Characters' tab.

Until now.

I've discovered a kludge that sticks them in there (more or less).

If you try this, you do so at your own risk!

First, close CoffeeCup, if running.

Make a backup copy of the file specchar.dat, which is in your CoffeeCup installation folder.

Open specchar.dat using notepad. To the bottom of the file, append these 4 lines:

"lsquo", "'", "‘", "‘", "HTML 4.0", "left single quotation mark"
"rsquo", "'", "’", "’", "HTML 4.0", "right single quotation mark"
"ldquo", """", "“", "“", "HTML 4.0", "left double quotation mark"
"rdquo", """", "”", "”", "HTML 4.0", "right double quotation mark"

Do not leave a blank line at the end.

Save the file USING ANSI encoding. Any other encoding won't work. This means that you won't see the real bendy quotes in the 'Characters' tab, but the codes will be there.

Now, start CoffeeCup and look in the 'Characters' tab. You'll now see lsquo, rsquo, ldquo and rdquo in the list. Insert them into your code as with any of the characters in this tab.

It would be nice if CoffeeCup allowed one to specify keyboard shortcuts for special characters, snippets, etc. Maybe one day...

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.