Reputation: 23379
I'm writing a quick script to remove duplicates from the database. I exported the database from phpMyAdmin before starting just in case I mess something up and I noticed some weird characters in a handful of rows. I'm wondering what might have caused this? The records are uploaded from a plaintext file delimited by bars ("|"). I'm not the one uploading the plaintext files so I don't know if the original files are being altered before upload/import but I use nothing but Notepad++. I know that the original flat file will never contain anything like this.
Also, I did a SELECT * FROM records
WHERE case_number
= ' š“Ïœ“5ø.lÕ''éíÿ" ÒŒ qDþ’' and it showed me the record, so it's not my text editor. These are actual rows in the DB.
Can anyone offer a suggestion as to what this might be, what might have caused it and how I might be able to fix it?
I welcome any suggestions at all. Thanks for looking.
EDIT:
My DB collation is set to latin1_general_ci
Upvotes: 1
Views: 454
Reputation: 12836
The problem seems with to be with the collation
that is set for your database. For eg, suppose you upload a totally proper looking file into MySQL, however if say your collation for the field(s) into which the data is ultimately saved is in, suppose, Chinese. Then when you try to retrieve and render content, it will show encoding issues.
Also try to view the content in PhpMyAdmin and see how it looks.
Upvotes: 1