I have a problem with my encoding when using forms. Form end up in undecoded UTF-8 text like "\xd0\xb0" for example is utf-8 Cyrillic "a".
The page has encoding set to UTF-8, the files are also UTF-8 without BOM and PHP also has mb_internal_encoding set to UTF-8. Still, i get unencoded text when printing $_POST["field"].
The form has the following params:
<form action="/User/AddDatabase/" method="POST" accept-charset="UTF-8">
This returns \xd0\xb0 when "a" is submited:
<input type="text" placeholder="Име" name="Name" '.(isset($_POST["Name"]) ? 'value="'.$_POST["Name"].'"' : '').' />
This returns the same as inputed:
<input type="text" placeholder="Име" name="Name" '.(isset($_POST["Name"]) ? 'value="'.utf8_decode($_POST["Name"]).'"' : '').' />
Is there a way to make this work without using utf8_decode function?