views:

98

answers:

3

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

+2  A: 

The problem is in the underlying blog engine. Wordpress does that by default, and there is AFAIK no way to turn it off (Without changing the code). Given the fact that there are only relatively few really great blog engines, there may not always be a choice to switch to something "better".

Also in the same category: Fancy dashes, aka. turning - into –

Michael Stum
A: 

the source shows that the quote char is sometimes ” that's the quote that is the good looking quote which will cause problem in a program.

i think either the WordPress text editor or storage/retrieval converted the ordinary quote into that one.

You can use the replace function in your program editor to replace those characters.

動靜能量
+5  A: 

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.

OregonGhost
"Because then it looks like it's a standard one, but it isn't." omg ;p
Unreality