Forums

apostrophe in PHP code posting (4 posts)

  1. crankberry
    Member
    Posted 2 years ago #

    My blog is about web development so I'm sharing a lot of php codes that I write, but the apostrophe is changing on me as I publish the article.

    Example article here:

    http://www.crankberryblog.com/2009/php-image-verification-aka-captcha-basic

    So I do my code in notepad in which I use ' and it copies perfectly fine into the writing box but it turns out ’ (I'm not sure if they'll show up), which if you copy and paste the final code back into word it won't work.

    I'm always posting my code in HTML edit format and the charset is the default one by wordpress UTF-8. Anybody have any ideas what I made need to edit?

  2. crankberry
    Member
    Posted 2 years ago #

    actually I pinned down to the plugin I'm using to highlight the code... its the Source Code syntax highlighting plugin: http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/

    it mentions that

    "In the OUTPUT there is a minor difference in that we use ''' instead
    * of PHP's ''' for a single quote: this provides compatibility with"

    but I tinkered with the code and nothing happened..

    should this thread be moved elsewhere?

  3. iridiax
    Member
    Posted 2 years ago #

    WordPress turns single and double quotes into "fancy" quotes that will not work in code. Here are the plugins I use for code and to de-fancy quotes:

    http://wordpress.org/extend/plugins/wp-syntax/
    http://www.semiologic.com/software/unfancy-quote/

  4. crankberry
    Member
    Posted 2 years ago #

    installed and tested... excellent plugin... thanks

Topic Closed

This topic has been closed to new replies.

About this Topic