How to remove the question marks in the feedback form on the website Bitrix?

Hello, put on this page, the feedback form, instead of letters there are question marks how to fix it?
Page where you placed the form code back when in utf-8
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
File config.php (the configuration file of the form) also in utf-8 $charset = "UTF-8";
Deduced this form using the following structure:
June 10th 19 at 15:37
1 answer
June 10th 19 at 15:39
In wrong encoding?
Now in this encoding
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

But will be utf-8 instead of windows-1251, it will still have question marks. - River_Kirlin commented on June 10th 19 at 15:42
You show the headers of the document, and I'm talking about the encoding inside the file with the form. - Michaela.Schiller commented on June 10th 19 at 15:45
here the code of the document which spelled out the code with the form


if ($_POST['act']== "y")
if(isset($_SESSION['captcha_keystring']) && $_SESSION['captcha_keystring'] == $_POST['keystring'])

if (isset($_POST['posName']) && $_POST['posName'] == "")
$statusError = "$errors_name";
elseif (isset($_POST['posEmail']) && $_POST['posEmail'] == "")
$statusError = "$errors_mailfrom";
elseif(isset($_POST['posEmail']) && !preg_match("/^([a-z,._,0-9])+@([a-z,._,0-9])+(.([a-z])+)+$/", $_POST['posEmail']))
$statusError = "$errors_incorrect";

elseif (isset($_POST['posRegard']) && $_POST['posRegard'] == "")
$statusError = "$errors_subject";
elseif (isset($_POST['posText']) && $_POST['posText'] == "")
$statusError = "$errors_message";

elseif (!empty($_POST))
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: $content charset=$charset\r\n";
$headers .= "Date: ".date("Y-m-d (H:i:s)",time())."\r\n";
$headers .= "From: \"".$_POST['posName']."\" <".$_POST['posEmail']."-->\r\n";
$headers .= "X-Mailer: My Send E-mail\r\n";


unset($name, $posText, $mailto, $subject, $posRegard, $message);

$statusSuccess = "$send";

$statusError = "$captcha_error";

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/sendmail/styling.css" rel="stylesheet" type="text/css" media="screen,projection">

<p id="emailSuccess">
<strong style="color:green;"><?php echo "$statusSuccess" ?></strong>
<p id="emailError"><strong style="color:red;"><?php echo "$statusError" ?></strong></p>

<div id="contactFormArea">
<form action="./" method="post" id="cForm">
<input type="hidden" name="act" value="y">
<label for="posName"><b>Your name:</b></label>
<input class="text" type="text" size="25" name="posName" id="posName">
<label for="posEmail"><b>Your E-mail address:</b></label>
<input class="text" type="text" size="25" name="posEmail" id="posEmail">
<label for="posRegard"><b>Subject:</b></label>
<input class="text" type="text" size="25" name="posRegard" id="posRegard">
<label for="posText"><b>Message:</b></label>
<textarea cols="50" rows="5" name="posText" id="posText"></textarea>
<label for="posCaptcha"><center><b>the Text in the image (digits)</b>:<a href="/sendmail/readme.html"><img src="/sendmail/kcaptcha?<?php echo session_name()?>=<?php echo session_id()?>" border="0"></a></center><input class="text" type="text" size="25" name="keystring" id="keystring">
br><br><label><input class="submit" type="submit" name="selfCC" id="selfCC" value=" Send "></label>
<?php include 'sendmail/kcaptcha/kcaptcha_rand.php' ?>

- River_Kirlin commented on June 10th 19 at 15:48
Here's the code with high probability inside the file is stored in Windows-1251 - Michaela.Schiller commented on June 10th 19 at 15:51
looked inside the file is not found anymore, indicating the encoding, only what I wrote above. - River_Kirlin commented on June 10th 19 at 15:54
That long above — the instructions to read, not conversion. If you register ютф8, but to prepare the file in another encoding, no directives will not help. The interpreter does not decode.
You need to open the file in some editor that is able to detect the character encoding to make sure that the encoding is wrong and right in the editor to convert to ютф8.
Just for fun, even through the admin panel to create a new file, then copy your code and save. Admin will create the correct encoding. Plug it in and make sure everything was approx. - Michaela.Schiller commented on June 10th 19 at 15:57

Find more questions by tags 1C-Bitrix