I saw a similar thread that perhaps this overflow thread may help to give some trouble shooting ideas. Perhaps one of the static files has some coding residue that needs to be omitted? I also am icluding a ajax ref that might give someone smarter than me a aha moment!
See comments below as well
Encoding is more than specifying the meta tag and content type - the files themselves must really be in the encoding you specify, or you’ll get mojibake.
Check that everything is using UTF-8, your database, database connection, table columns. Check that any static files you are including are also encoded in UTF-8.
share|improve this answer
answered May 20 '10 at 21:17
mdma
33.3k24282
Ok, I changed all my files including all the includes from ANSI to UTF-8. I looked at the database, but not sure I’m looking in right spot. The columns say under “COLLATION” “Latin1_swedish_ci” Not sure what this means though. How else can I check if the db tables/columns is utf-8? Also, after I saved all the files to utf-8 I now get an error stating “Cannot send session cache limiter - headers already sent” but I didn’t change any code other than saving the file as utf-8 and everything worked before I did this…not sure whats going on. Thanks for your help – Ronedog May 20 '10 at 23:10
Like the other comments are saying, this is to do with the byte order mark. See the other links from other posters, and also forum.mamboserver.com/showthread.php?t=42814 – mdma May 20 '10 at 23:21
Ok, I’ve read all those other posts. Basically they are saying there is a space or new line character either before the <?php or after the ?> tag. I’ve gone through all my code and all the includes and still get the same result. I even removed out every bit of code from the index.php page so it looked like this: <?php session_start(); ?>…no spaces anywhere before or after…no includes of other files that could affect it When I reload the page, I get same error message. HOWEVER, I decided to resave the index.php page as ANSI, and the error went away, but the encoding was no good??? – Ronedog May 21 '10 at 4:52
If you save index.php as UTF-8 and then open it up in a hex editor,you will see that there are indeed characters betore <?php - the byte order mark - it’s metadata and not shown in notepad/wordpad, but php has trouble with it. Use an editor that can save UTF-8 without the BOM and the problem will go away. – mdma May 21 '10 at 6:07
Thanks for your help…any idea on an editor? All I’ve ever used is notepad, notepad2, dreamweaver, wordpad. will any of these work? – Ronedog May 21 '10 at 14:28