tags:

views:

66

answers:

1

Hello

Using vim 7.2.330 on a Ubuntu host from an XP host, I'm stuck at how to type/paste the following line in a text file:

include_once(‘/full/path/to/app’);

The document says it's important to use ASCII 145 and 146, but vim turns them into "<92><93>", and Nano turns them into �.

Note that I'm using a European keyboard layout, not the US layout.

Does someone know how to solve this?

Thank you.

+5  A: 

Er, you should not be using the 2 types of special quotes for string quoting in PHP.

You should be typing

include_once('/full/path/to/app');

( That's ASCII character 39 )

This is not what it says at the end of this document: www.wpbbpthemes.org/integration/ "beware some pasting of this code make the ‘ character change, make sure it’s the button left of the enter key on your [US] keyboard"

No, you are misinterpreting it. Lots of software in windows, and varying keyboards, erroneously do "smart quotes". Word and Internet Explorer are such examples. As a result, copy-pasting from these applications results in the wrong type of character in your source code, often conflicting with the content-encoding the document is served as, which renders on the displaying browser as a silly Ä or similar character.

Do not use characters 145 and 146 in your PHP source, it is not necessary, and it won't work.

Also, Important to note, the authors of that page have USED THE WRONG QUOTES IN THEIR EXAMPLES and as such, WILL NOT WORK AS STATED.

Their statement with regard to "beware some pasting will make the character change" is bogusly incorrect, they have the incorrect character in their source, and as such, copy-pasting it at any time will not work.

Kent Fredric
This is not what it says at the end of this document: www.wpbbpthemes.org/integration/"beware some pasting of this code make the ‘ character change, make sure it’s the button left of the enter key on your [US] keyboard"
Additionally, the dude says on his website: 'I wanted to contribute to the bbPress community but I’m not a coder.'. Summary: You should not listen to any advice he has regarding coding.
Kent Fredric
Thanks for the help. I have to follow this document as it was pointed to me in getting those two applications to work together. I'll ask the author.
@overtherainbow - look at @Kent_Fredric's reputation--15.5k is far above the norm for Stack Overflow. He knows what he's talking about. You should trust him more than the author of the document you're reading.
Kimball Robinson
Sure. I didn't doubt Kent's explanations.