chokk Posted October 24, 2010 Share Posted October 24, 2010 I'm using utf-8. Mozilla Firefox, IE, Google Chrome displays 'å' 'Å' as desired: 'på'.Opera, Safari displays: p̊What's up with that? Link to comment Share on other sites More sharing options...
boen_robot Posted October 24, 2010 Share Posted October 24, 2010 Maybe the default font is different, and is one that doesn't support the exact glyphs you're using... have you explicitly set the font to something? Link to comment Share on other sites More sharing options...
chokk Posted October 24, 2010 Author Share Posted October 24, 2010 The default font is Trebuchet. When I set the charset to ISO-8859-1, the letter å displays correctly in opera and safari, but now displays incorrectly in ie, firefox and chrome? Link to comment Share on other sites More sharing options...
boen_robot Posted October 24, 2010 Share Posted October 24, 2010 Then this can only mean you haven't said the charset to UTF-8 everywhere.Here's a short checklist:1. File encoding, as seen from the editor. Open the problematic file, and go to "File > Save As...", and see if the encoding dropdown says "UTF-8".2. Header encoding. If using PHP, you can set it with the header() function. If using plain ".html" files, you can use .htaccess to set the header.3. Meta encoding - I'm assuming the encoding you've been altering. Link to comment Share on other sites More sharing options...
chokk Posted October 24, 2010 Author Share Posted October 24, 2010 Well I'm certain I've set the charset to UTF-8 everywhere. Although the problem only seems to affect pages where I have text loading from the database. Will that affect special characters? Link to comment Share on other sites More sharing options...
boen_robot Posted October 24, 2010 Share Posted October 24, 2010 Oh yes... two more vectors added to the checklist then:4. Use mysqli_set_charset() or equivalent to set the connection charset to UTF-8. Do so every time you connect to the DB, regardless of what you're doing with it.5. Use utf8_general_ci as your DB collation.NOTE: Old data can't be fixed. These settings will only make new data display properly. Link to comment Share on other sites More sharing options...
chokk Posted October 24, 2010 Author Share Posted October 24, 2010 Thanks a million! I believe this was the culprit. Testing it first thing in the morning! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.