Live data from Hacker News

Why the #AskObama tweet was garbled on screen

hanselman.com

31–40 of 78 posts

Re: Why the #AskObama tweet was garbled on screen

#31
What bugs me is not the mis-encoding (though that's a fail), but that people "struggled to understand" it... surely everyone's seen apostrophes turn into these special characters on enough web pages over the past ten years to have recognized what's happening when it does.

Re: Why the #AskObama tweet was garbled on screen

#32
post #12

"This is SUCH a classic sloppy programmer mistake that I'm disappointed" Oh come off of it. This happens everywhere on the web on probably something like 25% of websites. And it's NOT always the consuming program's fault: very often somebody upstream, e.g. the hosting company, the person that wrote the HTML, the source of an RSS feed being inserted into the page etc. etc. forgot to encode something the way somebody e…

Actually, the correct order is defined in the HTML5 spec now: http://dev.w3.org/html5/spec/parsing.html#determining-the-ch...

Re: Why the #AskObama tweet was garbled on screen

#33
post #13

Earlier quoted context omitted.

Twitter said that the message in question is UTF-8. The message recipient decoded the message with something that is not UTF-8. That's a sloppy mistake and should without doubt have been caught in testing.

The company responsible seems to have responded in the comments: "It was definitely a mistake on our part. The problem was not the encoding on our data feed, but the HTML document was sent with ISO-8859-1. The second we inserted the twitter text into the DOM, the browsers interpreted the UTF-8 string as ISO-8859-1. Our visualizations are hosted on other platforms, and in this case the server was not configured to sen…

Including is like the first thing you do when starting front-end development.

Every time you don't validate...God kills a kitten. Please, think of the kittens.

This has been a Public Service Announcement. Please code responsibly: http://validator.w3.org/

Re: Why the #AskObama tweet was garbled on screen

#34
post #28

I find it infuriating that this sort of thing is still a problem. I'm constantly seeing mangled apostrophes in places like Google reader too.

I would personally blame Wordpress for substituting a common apostrophe ' as the left ‘ and right quote ’ respectfully. Same with quotation marks “ and ” instead of the traditional ". There is an option to not use "Smart Quotes", but it seems to be enabled by default.

Wordpress is for writing, and writing should be properly typeset, and properly-typeset text has proper quotes.

BTW, a note on the term “smart quotes”: that originated when word processors became “smart” about transforming the easy-to-type (but incorrect) ' and " to their proper equivalents automatically. The quotes themselves aren’t smart…they’re just quotes.

Typography nerd out.

Re: Why the #AskObama tweet was garbled on screen

#37
post #4

Why does it say 3 hours ago under the tweet? Wasn't this in real time?

>Wasn't this in real time? No. Questions were culled from Tweets with the #AskObama hashtag starting on June 30. Some of the questions did come in close to real-time. I think the most recent ones were 5-10 minutes old when presented to the president.

So how did they choose the questions then? Based on retweets, or the Twitter team just picked the ones they liked?

Re: Why the #AskObama tweet was garbled on screen

#39
post #8

Maybe I'm just a terrible programmer, but I think the author may be a little over emphasizing the seriousness of the bug. To me, this is one of those throw away issues that you keep in the back of your mind. Unless I'm coding something that is extremely datacentric and critical in that sense. But it's not like its on one of my "top 20 must run tests" or anything. It's always one of those issues I ignore or assume is…

> Or maybe I've just been fortunate enough to be in an environment where an occasional goof of this caliber doesn't have any serious consequences. Primarily, this means you don't have to support internationalization - which is hardly a bad thing, especially if you work on a startup, where worldwide distribution should be the last thing on your mind. When your product is rendered in over 80 scripts, including right-to…

And Hanselman works for Microsoft, where i18n is a big deal. So yes, for someone who's been at MS for a while i18n related issues become second nature. But if you typically are only targeting the United States, it's more understandable to not have these things on the brain.
Post reply on HN