I'm starting to use cakephp and i still have some doubts. Precisely about the .ctp files. After research, i found they are template files used to phpcake to read php code. But what about the encoding. I tested this code in a file with "Utf-8 without bom" codification", but browsers still can't recognize letters like "ç" or "ã" contained in the following example:
<!-- File: /app/View/Posts/add.ctp -->
<h1>Add Post</h1>
<?php
echo $this->Form->create('Post');
echo $this->Form->input('Nome Produto');
echo $this->Form->input('Código Produto');
echo $this->Form->input('Versão');
echo $this->Form->input('Data');
//echo $this->Form->input('body', array('rows' => '3'));
echo $this->Form->end('Criar Ficha');
?>
There is some particular configuration i need to add to this ctp files to avoid this codification problems?
P.S. Problem solved. The Form->input was created wrong. Should have been:
echo $this->Form->input('cod_produto', array('label' => 'Código Produto:'));
since the first parameter is the name of the field in the bd. Thanks mark for all the help!