I've hit a weird error.
åäö gets all weird signs(like squares with a ? in it), but all the charset is set to utf-8 so it should work.
All the files are encoded as utf-8 without BOM.
It worked great(without the weird signs) before I added some stuff to the database, and now those gets weird signs in it.
I checked my database, and it's the way it's supposed to be.. columns are swedish_latin_ci or w.e it's called.. :S
@codefreek- Charset on the html page is already utf8, and "SET Latin1"... would only bring it back to how it was in the beginning because that's what it was at first. html_entities wouldn't work, and nl2br shouldn't work either as it only converts nls(\n - ENTER) to <br />.
Btw, as you see.. the staticly printed "Användarpanelen" at top right is output correctly, so there's nothing wrong with the file-encoding. There must be something with the database since it's only the data from the database that are being shown with those errors..
Well, by looking at the pageinfo and the charset of the output on the page, it's set to UTF-8 already..
Could this be something due to I'm using a MVC-framework? I remember I had some troubles with this while using CodeIgniter..
I'm using my own MVC-framework right now, but could probably be the same issue here. Though I have no idea how to solve it since I don't have the options that I changed in order to make CI work correctly..
Now create a new DB or reuse the old on and dump it back in (making sure that the tables and database are set to utf8):
sketch@talkphp:~$ mysql -u root -p databasename < databasename-iconv.sql
Sorry, i don't know how you would do this on redmond.
Alternitively you could try this fudge.
basically convert the column with the problem data in to a binary format then convert back the charset to utf8 again, this should force mysql to convert the data.
sketch@talkphp:~$ mysql -u root -p databasename
mysql>alter table tbl_name modify column col_name CHAR(255) CHARACTER SET binary;
mysql> alter table tbl_name modify column col_name CHAR(255) CHARACTER SET utf8;
obviously replace the 'CHAR(255)' with whatever the current data type is.
I haven't tested it, so you would be best advised to create a backup!
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)