I have a Joomla module with form:
<form id="ContactForm" action="<?php echo JRoute::_('index.php?option=com_k2&view=search&layout=search&Itemid=1303');?>" method="post">
<table>
<tr>
<td>
Vyhledat: <input type="text" name="searchKey" value="" style="width: 400px;"/>
</td>
<td>
<input type="submit" value="Vyhledat" /><br />
</td>
</tr>
</table>
</form>
And I use POST method to get the data to the destination.
I “catch” them with:
$foo = JRequest::getString('searchKey');
When I search for words without diacritics (adam, andy, anything) it works perfect. However it is a Czech site and it uses diacritics so when I try to search for Jiří, the letters ř and í are stripped away and it is using only JI.
My question is: Why does it do that and how to fix that?
Joomla get string method will remove special characters
Read this Official Joomla’s Doc
http://docs.joomla.org/Retrieving_and_Filtering_GET_and_POST_requests_with_JRequest::getVar
with JREQUEST_ALLOWRAW will solve your prblem