Removing UTF-8 Invalid Characters from MySQL

Discussion in 'MySQL' started by LazyD, May 4, 2007.

  1. #1
    Hello All, I posted a thread in the HTML area regarding the w3 Validator not being able to check my site. It turns out the listings in my database include invalid characters for the UTF-8 charset. They are showing up as "?"s

    The file was made in Excel(Saved as XLS), then saved as CSV, then with a PHP script insert/updated into the database.

    Im getting question marks after certain parts of the names in the database.

    How can I remove these invalid characters? Can I simply change the collation of the DB to UTF-8 Unicode or do I need to do something more?

    Can I make use of a PHP script or MySQL command?
     
    LazyD, May 4, 2007 IP
  2. carowan

    carowan Peon

    Messages:
    473
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i believe you can jut change the collation, I had to do something similar when upgrading Vbulletin.
     
    carowan, May 4, 2007 IP
  3. LazyD

    LazyD Peon

    Messages:
    425
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Changing the collation didnt remove invalid characters, however, it did make the erroneous characters show up in the DB.

    I found the 3/4 variations of the incorrect characters and am using a PHP script to replace them
     
    LazyD, May 5, 2007 IP
  4. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #4
    To avoid collation and all sort of another annoyances I installed an old phpMyAdmin directly under my webspace and no more problems since then :rolleyes:
     
    Your Content, May 6, 2007 IP