Super.D Posted February 24, 2013 at 09:43 AM Report #496820 Posted February 24, 2013 at 09:43 AM Boas, Ando a desenvolver uma cena para uns amigos e estou a ter uns problemas com o charset. Quando eu insiro numa textbox: Olá. No outro painel onde mostrar isso aparece: Ol. Eu já troquei o charset mas nada... Onde mostra as coisas é num echo. echo "<div id='viewduvida'><b>Data: </b>$field6<br><b>IP: </b>$field7<br><b>Nome:</b> $field1<br><b>Título:</b> $field2 <br><b>Dúvida:</b> <textarea disabled rows='6' cols='45'>$field3</textarea> <br><b>Helper que respondeu: </b>$field4<br><b>Resposta: <textarea disabled rows='6' cols='45'>$field5</textarea><form action='' method='post'><b>Responder:</b><br><textarea rows='6' cols='45' name='responder'></textarea><br><input type='submit' name='responderbutton' class='buttons' value='responder'> <input type='submit' name='apagarbutton' class='buttons' value='apagar'> <input type='submit' name='banirbutton' class='buttons' value='banir'></form></div>";
NunoDinis Posted February 24, 2013 at 12:46 PM Report #496835 Posted February 24, 2013 at 12:46 PM Com o código na horizontal nem o li.. mas vou partir do pressuposto que é disto que necessitas: uf8_encode($field); //adapta o $field para o campo que recebe o valor Estranha forma de vida que tem a capacidade de transformar comandos em mensagens de erro. ndsotware.org
Super.D Posted February 24, 2013 at 01:18 PM Author Report #496839 Posted February 24, 2013 at 01:18 PM (edited) echo "<div id='viewduvida'><b>Data: </b>$field6<br><b>IP: </b>$field7<br> <b>Nome:</b> $field1<br> <b>Título:</b> $field2 <br><b>Dúvida:</b> <textarea disabled rows='6' cols='45'>".utf8_encode($field3)."</textarea><br> <b>Helper que respondeu: </b>$field4<br><b>Resposta: <textarea disabled rows='6' cols='45'>$field5</textarea> <form action='' method='post'><b>Responder:</b><br><textarea rows='6' cols='45' name='responder'></textarea><br> <input type='submit' name='responderbutton' class='buttons' value='responder'> <input type='submit' name='apagarbutton' class='buttons' value='apagar'> <input type='submit' name='banirbutton' class='buttons' value='banir'></form></div>"; Não dá =s Edited February 24, 2013 at 01:19 PM by Super.D
NunoDinis Posted February 24, 2013 at 01:22 PM Report #496840 Posted February 24, 2013 at 01:22 PM qual é a codificação do teu ficheiro ? Estranha forma de vida que tem a capacidade de transformar comandos em mensagens de erro. ndsotware.org
Super.D Posted February 24, 2013 at 01:46 PM Author Report #496843 Posted February 24, 2013 at 01:46 PM qual é a codificação do teu ficheiro ? É o iso. Se estás a falar do ficheiro php.
HappyHippyHippo Posted February 24, 2013 at 02:17 PM Report #496846 Posted February 24, 2013 at 02:17 PM iso-8859-1(5) é diferente de utf-8 usa uma ou outra (de preferência o utf-8 IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
Super.D Posted February 24, 2013 at 02:33 PM Author Report #496848 Posted February 24, 2013 at 02:33 PM Já os troquei e continua na mesma...
HappyHippyHippo Posted February 24, 2013 at 02:38 PM Report #496849 Posted February 24, 2013 at 02:38 PM então, tens as páginas a serem apresentadas em utf-8, e tens os ficheiros em utf-8 ... por acaso não tens uma base de dados pelo meio, pois não ? IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
Super.D Posted February 24, 2013 at 02:40 PM Author Report #496850 Posted February 24, 2013 at 02:40 PM Tenho...
HappyHippyHippo Posted February 24, 2013 at 02:42 PM Report #496852 Posted February 24, 2013 at 02:42 PM e já verificaste que se estás a gravar a informação em utf-8 nas tabelas ? IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
Super.D Posted February 24, 2013 at 02:45 PM Author Report #496853 Posted February 24, 2013 at 02:45 PM Tenho de modificar a colação?
HappyHippyHippo Posted February 24, 2013 at 02:51 PM Report #496855 Posted February 24, 2013 at 02:51 PM tudo deverá ter a mesma codificação ... IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
Super.D Posted February 24, 2013 at 02:52 PM Author Report #496856 Posted February 24, 2013 at 02:52 PM A colação na db está em: latin1_swedish_ci.
Super.D Posted February 24, 2013 at 05:19 PM Author Report #496872 Posted February 24, 2013 at 05:19 PM Anyways mudei de host e já dá.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now