• Hi – I needed to connect to a WordPress database and pull information using my own PHP code. Mostly this works fine but I notice any quote marks are replaced by strange ? characters.

    I am sure that this is someting to do with escaping, any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Probably your own script/code is not working with the same encoding as WP. the default in WP is utf-8. Or, the page/site where you display anything pulled from the DB database is NOT utf-8 encoded.

    Thread Starter steve84

    (@steve84)

    My page is a strict DOCTYPE using UTF-8 <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />.

    I ran the data through this function $content = iconv(“ISO-8859-1”, “UTF-8”, $content);

    Now the quotes marks have disappeared completely – also the paragraph breaks have been removed – any ideas?

    Steven

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Escaping ? characters’ is closed to new replies.