Reputation: 329
I have a bunch of text files that were written to a Linux server, that I need to pull into the database. I'm using file_get_contents() to grab the contents of the files. The text files have a lot of special characters in them (things like this:àáâãäåæçèéêëìíîïòóôõöøùúûü) , and they just aren't going into the database correctly (this is specifically going into a Wordpress site).
Things I've checked or tried:
Depending on what I try, I get either the A with the little squiggly over it, or more commonly, a rectangle with what looks like the numbers 00 86 in it.
I'm stumped -- if anyone has any other suggestions, I'm all ears!
Upvotes: 1
Views: 367
Reputation: 4693
Make sure (in order of importance):
numbers 1 and 2 are the most common problems. (Number 2 especially - if your server sends headers specifying a different encoding, the browser will try to use that encoding, even if the meta tag says "utf-8".)
Upvotes: 1