WordPress.org

Ready to get started?Download WordPress

Forums

Collation of Spam comments (2 posts)

  1. macsoft3
    Member
    Posted 5 years ago #

    Hello. I'm writing a PHP program to build a spam comment database. More specifically, I select specific fields on the wp_comments table and insert data into a similar table on a different database. First several rows will be successfully inserted into a new table. But... The collation of the original comment_content field is set to latin1_swedish_ci. Spammers use some irregular characters. And it appears that the collation of the comment_content field blocks those comments where irregular characters are used. How do I know? If I skip this field (comment_content), all hundreds or thousands of rows with other 14 fields (skipping comment_ID) will be successfully imported into a new table. Changing the collation to utf8_unicode_ci doesn't help. Does anybody have any idea what's the best collation to access all spam characters?

    Thank you.

    Tom Bluewater

  2. macsoft3
    Member
    Posted 5 years ago #

    All right. Now, I know what's the causing the problem. It's the collation. It's apostrophe in the comment that ceases the program.

Topic Closed

This topic has been closed to new replies.

About this Topic