[eluser]bl00dshooter[/eluser]
[quote author="Patrick Maciel | @p4designer" date="1289095980"]Hello everbody.
I have one simple question: why not get the CodeIgniter default charset defined in the config.php file to echo (php)?
I'm asking this because if I only want to display a message on the index () function of a controller, such as:
I get invalid characters = 'á'.
But to solve this, is theoretically simple, just add this code:
Code:
header ('Content-Type: text / html; charset = utf-8');
, first line of the index ().
I know the HTML meta tags, etc.. But this is not the issue. I wish only to show a message with special characters.
Can you help me and/or explain to me why the CodeIgniter not get the default charset in config.php?
Sorry for my English, I am Brazilian and I need more practice.[/quote]
Arquivo config.php:
Quote:/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
*/
$config['charset'] = "UTF-8";
Creio que seja isso?
PS: também sou brasileiro.