Jump to content

Apostrophes in html


shirleyh

Recommended Posts

I recently coded my first email blasts, 7 total with different vendors doing the mailings and lists. When we tested, the apostrophes came up as diamonds with question marks in some of them (not all). This only happened when clicking the view web version.

 

I substituted them with ' which I found as code on the W3 site.

On a few of the emails, the ' actually showed up! Example: you'll

I am thinking the numeric code of &39; is what needs to be used?

 

Do I have to hunt down all apostrophes within text or is there something I'm doing wrong causing the icons to show up? Is it in something in the DOCTYPE that needs to stated or somewhere else?

 

Thanks very much, I'm very new to this.

Link to comment
Share on other sites

The only characters that require entities are < and &. The rest are optional and depend on the situation.

 

Are you sure you're typing an apostrophe? I know that some people with european keyboards sometimes accidentally use ´ rather than ' for an apostrophe. Your editor might be substituting the apostrophe for one of those embellished single-quotes as well.

Link to comment
Share on other sites

People use the single quote as an apostrophe. I get the copy from a copy writer, I don't provide the copy. But don't see any other option to type an apostrophe? Maybe this is why the apostrophe shows up so strangely (it's really a single quote?). I have actually seen a lot of job descriptions online where I see the same thing with the diamond shaped symbol with a question mark in it. I tried to attach an image, but it gets rejected.

Link to comment
Share on other sites

Here's a list of other unicode characters that some programs input rather than an apostrophe: http://en.wikipedia.org/wiki/Quotation_mark_glyphs

Alternate single-quotes:

’ ‘ ‛ '

Alternate double-quotes:

“ ” ‟ "

 

If you're receiving documents with any of those characters there's a chance that some browsers with certain fonts and encodings won't render them. Go through the text you're receiving from people and make sure the apostrophes and quotation marks are actually ' (ASCII 39) and " (ASCII 34) before putting them on your web page.

Link to comment
Share on other sites

Thanks. I've been combing through all sorts of answers. What seems the problem is and all our copy is written in Word. Default is usually set at smart quotes rather than straight quotes (which is what an apostrophe should be).

 

ASCII 39 and 34 are greek to me. I don't know what that means... straight vs smart quote (curly) right?

Is there a way to convert back to straight quotes easily? I tested bringing into plain text and it still kept the curly. Search and replace seems the best so long as I open in my Word and the setting is straight. We use a lot of (curly) quotes in text, I don't think these emails did, I suppose those need to go to straight as well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...