Friday, September 16, 2011

Apostrophes in Facebook Likes

When coding the html for a Like for Facebook we wanted to put an apostrophe in the text that would be displayed to go along with the Like. Unfortunately we kept on running into the issue of Facebook replacing the apostrophe with a little box with some funny characters in it.

Now this happened in all of the browsers we tested in so we figured this had to be a Facebook issue. After a couple of hours of searching I couldn't find anything and had to turn to my coworker Dan and here was his response:

There are a couple of issues:
  1. Word processors generally change any quotes to right or left quotes (if there is a non-space character before, it changes to right quote, otherwise left). The normal single quote is ASCII 39, right single quote is 146, left is 145. Codes above 127 are not defined in HTML 4.
  2. When you copy the text to Dreamweaver, it keeps the same ASCII code, but displays the normal single quote, like most browsers will eventually do unless the page uses a "Strict" doctype. A slightly more sane approach would have been to replace characters over 127 it with the corresponding HTML code, but apparently it doesn't.
  3. When you click the button to share the page with Facebook, it downloads the page, gets the text from the description meta tag, and caches it so it doesn't have to keep reloading the page. Then it displays it's page using an HTML4 strict doctype, so any browsers that actually follow the HTML standards (anything except Internet Explorer) are supposed to not "fix" things like extended ASCII characters. Instead it show the box with the ASCII code in hexadecimal.
  4. Since the description text is cached, if you make any changes (like replacing the ' with ’) and try to share again, it won't update it, it'll keep showing the same incorrect text. You can force Facebook to reload the page by using the Debugger: developers.facebook.com/tools/debug

Wednesday, September 07, 2011

Standard Mail and fun with the Post Office

In July and August of 2011 we had seen some instances where the difference in time between when Mail Services and the time we had it in hand saw mail times in excess of 2 weeks when we had been averaging about 2 or 3 business days for some time now. Because of this I did some digging and compiled the following info on the Post Office and mail delivery.

I follow Hess Printing on Twitter and they had an article that advises that it can take between 7 to 10 business days (10 Facts about Standard Mail).

I found another mailing services company that says to estimate 7 to 15 business days (Print Place). This was the longest time I found, on the web, though.

The USPS does not guarantee delivery time for Standard Mail (USPS Google Cached FAQ).

"Standard Mail" is USPS speak for "Bulk Mail" as opposed to "First Class". It goes:
  1. Express
  2. Priority Mail
  3. First-Class
  4. Parcel Post
  5. Bound Printed Matter (Media Mail)
  6. Periodicals
  7. Standard Mail (Bulk Mail)

Only Express has a guaranteed time to deliver and all of the others do not. This is primarily because the USPS is legally bound to deliver to EVERY postal address and this induces considerable variations depending on where it is mailing from and where it goes to.

This will probably be changing considerably in the future as the current Postmaster General (Patrick Donahoe) is pushing to cut 220,000 positions and almost 4,000 locations by 2015. Actually, their financial position is so tenuous that it is projected that they will be insolvent by the end of September 2011. Yes, this month.