Welcome Guest, Not a member yet? Register   Sign In
echo : default charset
#4

[eluser]bl00dshooter[/eluser]
[quote author="Patrick Maciel | @p4designer" date="1289098082"]Opa! Um brasileiro por aqui.
Sim, mas é essa a questão meu amigo. Já está configurado no arquivo config.php, e algo como:
Code:
function index() {
   echo 'Olá Mundo';
}
... resulta em caracteres inválidos. Ai pra resolver, eu tenho que fazer:
Code:
function index() {
   header('Content-Type: text/html; charset=utf-8');
   echo 'Olá Mundo';
}

For english users....
I've put in the config.php file as UTF-8 charset.
But as shown in the code above, only when inserted header (php), that the word 'Olá' is displayed correctly.

=/[/quote]

Bem, acredito que não há como alterar isso sem modificar o core, o que não é recomendado.
No mais, não use header no controller, todo output deve ser feito na view, com a metatag apropriada.
Usar header no controller é considerado bad practices.\


Messages In This Thread
echo : default charset - by El Forum - 11-06-2010, 03:13 PM
echo : default charset - by El Forum - 11-06-2010, 03:18 PM
echo : default charset - by El Forum - 11-06-2010, 03:48 PM
echo : default charset - by El Forum - 11-06-2010, 03:55 PM
echo : default charset - by El Forum - 11-06-2010, 04:09 PM
echo : default charset - by El Forum - 11-06-2010, 04:26 PM
echo : default charset - by El Forum - 11-06-2010, 06:22 PM
echo : default charset - by El Forum - 11-06-2010, 07:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB