I installed a site locally on OSX. The site was developed under windows and have cyrillic (Windows) encoding for some string values.
I noted that some buttons with cyrillic values wouldn’t work until I change the value to english. The button looks for this, for example:
JavaScript
x
<form action="{$REQUEST_URI}" method="POST" name="addForm" id="addForm">
<td colspan="2" align="center"><input type="submit" name="addDo" value="Добавить" class="btn"></td>
</form>
and in php I get void (false) string here:
JavaScript
$addDo = $_POST['addDo'];
if($addDo)
When I change it to
JavaScript
<td colspan="2" align="center"><input type="submit" name="addDo" value="Add" class="btn"></td>
It starts to work properly.
Why can this happen? The site is not my to change, therefore the question is How can I change my OSX setup to make this site works like on Windows?
P.S. This html file is fetched from php module by smarty:
JavaScript
$smarty->fetch('login.html');
Advertisement
Answer
I had to set my php configuration as well.
Just go to php.ini and change from
JavaScript
default-charset="utf-8"
to
JavaScript
default-charset="windows-1251"
restart the local server – and everything works now.