What happened was that if I insert portuguese text comming from an edit boxe the characters were written ok but if I insert static text (from the theIDE editor) in the database the text get wrong charset. So do not forget to set the character set of the theIDE editor!