encodingsmart-quotes

What made many of the coding websites converting standard " into non standard ”?


This question is about standard double quote " and non-standard double quote &

Yesterday when I searched for some sample facebook serverfbml codes, and came upon to this

http://mahmudahsan.wordpress.com/2008/11/22/facebook-fbml-rendering-in-iframe-application/

okay so it has got what I want, so I copied the code to my project and run it... bah... lots of errors

Why? Because the site turned the standard double quote " inside his script into or , or single quote from ' into

This is not the first time I faced this problem when copying codes from the Internet, and I believe many of the code writers haven't expected that the site turned their single/double quotes into strange ones.

Any explanation to this strange phenomenon ?

edited: I notice the title converted my " into & too... let me edit it... oh and I failed


Solution

  • At least in the title or in the text, it looks much better to have typographic double quotes (i.e. is more pleasant to the eye). Coding sites should not do this for actual code, i.e. in StackOverflow code that is indented by four spaces. If a double quote in text is converted to typographic, it's fine.

    This gets really worse when you paste typographic quotes into a console that tries to display the character and falls back to a standard quote, because the console font does not have a typographic quote. Because then it looks like it's a standard one, but it isn't. Not much you can do about it, other than use a code display plugin on your website that does not change code.