I am passing a parameter to my codeigniter function in unicode but it is unable to store it in to the variable. It is showing the value in the javascript variable properly but not in the controller function parameter. If I pass a value other than unicode than its working properly.
here is my code: view page:
<script type="text/javascript">
$(document).ready(function(e) {
$("#search").click(function(){
if ($('#search_key').val()=="")
var user_id ="srch";
else
var user_id = $('#search_key').val();
alert(user_id);
window.location.replace("<?php echo base_url("units/keyword"); ?>/"+user_id);
});
});
</script>
Here is my controller function
public function keyword($s)
{
echo $s;
}