Codeigniter xml_from_result output with strange characters "" ""

I am using the codeigniter system as I have these "" "" characters in any output

//config.php

$ config ['charset'] = 'UTF-8';

my print http://web.wipix.com.br/Capturar.PNG

/* Model */
public function AllVotos()
{
$this->load->dbutil();          

$select = $this->db->query("SELECT SUM(voto = '0') as insatisfatorio,   SUM(voto = '1') as bom, SUM(voto = '2') as excelente FROM qr_wiplay_participacoes ");

$config = array (
            'root'    => 'root',
            'element' => 'element',
            'newline' => "\n",
            'tab'     => "\t"
           );

return $this->dbutil->xml_from_result($select, $config);
}



/* Controller */

public function AllVotos(){

$xml = $this->home_model->AllVotos();

$this->output->set_content_type('text/xml');

$this->output->set_output($xml); 


}

      

+3


source to share


1 answer


this is because the files have a BOM signature use your editor to remove Dreamweaver signatures



Modify => Properties page => Title / Encoding => Clear => Include Unicode Signature (BOM)

      

+2


source







All Articles