We have a HTML form and it contains textboxes and file input. We are sending form with Malsup's jQuery Form Plugin. When we are posting without file, there is no problem in the charset like this:But when we want to add file via
Browse...
button and post then, all of form values are broken down like this. Our all encoding is in
UTF-8
format. When we use iconv
like this, iconv('UTF-8', 'ISO-8859-9', $_POST['value']);
, problem fixes. But you know, it is not solving problem, it is only covering wound with fluster. In the local server, there is no problem uploding file. But when we use iconv
in local, charset is broken down too. I don't want to use a function like this:
function piconv($value)
{
$local = (in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1','::1'))) ? true : false;
if (isset($_POST[$value]))
return ($local) ? $_POST[$value] : iconv('UTF-8', 'ISO-8859-9', $_POST[$value]);
}
I did not manage to solve the problem. Please could you help me?