• Hello,
    I’m currently trying to build a ‘quick admin’ with a script I built outside of wordpress.

    The script takes the contents of a csv file and inserts it into the database.

    However, whenever a Non-UTF character gets put into one of the fields the insert won’t finish for the field (column). It cuts off at the special character. In my case it’s –. I know I could Find & Replace it but other characters will be an issue.

    I’m using the integration method as specified in the wordpress codex. Here is a sample:

    require('globals.php');
        require('functions.php');
        require('csv.class.php');
        define('WP_USE_THEMES', false);
        require('../wp-blog-header.php');

    Here’s a sample of the script:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I see that wordpress can do a post with special characters (including –). So wordpress can do this. But I just don’t understand what I’m doing wrong. Should I be using prepare?!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘"Hack Plugin" won't insert special characters’ is closed to new replies.