Accentuation Problems - PHP and HTML

Asked

Viewed 26 times

0

I have checked on several sites, I did several tests and so far I could not solve my problem regarding centuação in php. I receive a small text in a variable, but when comes with accent appears very disfigured in this way the . I’ve tried to

$variavel = utf8_decode($_POST['texto']);
$variavel = utf8_encode($_POST['texto']);
$variavel = mb_convert_encoding($_POST['texto'], "Windows-1252", "UTF-8");

in html head

 <meta charset="UTF-8"> e <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

and in php already tried

header('Content-Type: text/html; charset=UTF-8');

But I’m not getting solution, I don’t want to take away the accents, because I’ve found function that does it, I just want the accentuation to come out correct and not so the Someone could help me ?

  • This variable is coming from the bank?

  • no, any text typed in a textarea form.

  • post the code you have so we can take a scan

  • I receive the code of a form <div class="Row"> <! --#information --> <div class="col-Md-12"> <label for="communicated">Information</label> <div class='col-Md-12 col-Sm-12 col-Xs-12 input-group'> <span class="input-group-addon btn-default"> <span class="glyphicon glyphicon-user"></span> </span> <textarea maxlength="5000" type="text" Rows = "5" class="form-control" name="communicated" id="getCommunicated" placeholder="" required></textarea> </div> </div> </div>

  • Take a look at this how to create a minimum, complete and verifiable example and edit your question

  • send to another page and receive with post , $informa = utf8_decode($_POST['communicated']); and when I display it in a modal echo, it comes out all weird

  • It is difficult to help with incomplete information and scattered in :D comments

  • is well so, I receive information coming from a TEXTAREA, I send to another page via POST, qdo dou um echo na variavel da outra pagina ele vem igurado.

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.