Reputation: 713
My codeIgniter application serves all html pages with a header of Content type: text/html; charset=iso-8859-1. I would like it to serve utf-8 by default. I checked the config file and the database config file.
$config['charset'] = 'UTF-8';
It just keeps encoding iso-8859-1..
Upvotes: 0
Views: 1583
Reputation: 9596
Make sure your HTML templates aren't setting a different charset. Check whatever templates have the opening <html>
and/or <head>
tags.
Edit Since your templates are encoded properly, it will probably be worthwhile to do a quick "find in files" search for iso-8859-1 and see where it's getting overridden. If it's anywhere in the core CodeIgniter instance, and you're using the most recent version (and haven't edited the core), then it might be a bug, and you'll need to report it to the CodeIgniter people.
Keep in mind, though, that it's not necessarily a bug, but a different setting overriding that one. Make sure you look at the context of any instances you find it, before you jump to the bug report form.
Upvotes: 0