3

I'm using codeigniter framework since any output i have this chars "´╗┐´╗┐"

//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); 


}
Community
  • 1
  • 1
Tuyoshi Vinicius
  • 861
  • 8
  • 22
  • I get `´╗┐` when I execute `type a.xml` on a utf-8 file with BOM (using Windows cmd too), and only `` when I do the same in a file without BOM. So `´╗┐` must be the BOM in your command line's codepage. I don't know why you are getting those symbols twice, though. – Jong Bor Lee Feb 04 '13 at 13:22
  • Please provide the hexdump of that XML string, see http://stackoverflow.com/a/1057579/367456 - and not as screenshot, just as formatted text inside your question. – hakre Feb 06 '13 at 00:52
  • Thanks for the comments. My problem isn't in "string" but in page output, when xml is generated the strange characters not appear, i just see when I executed "type allvotos.xml" in windows cmd if my page output is null the strange characters too appear. I think it's something related to Codeigniter framework – Tuyoshi Vinicius Feb 06 '13 at 11:08

1 Answers1

2

this is because the files are with BOM signature use your editor to remove the signatures Dreamweaver

Modify => Properties page => Title / Encoding => Clear => Include Unicode Signature (BOM)
Sadashiva Madan
  • 203
  • 1
  • 8