I am facing one issue while i'm creating my website. I have a search bar on my website. I tried to type and search in chinese, but the search terms on page that i entered become question mark and symbol. The url also same. I'm wondering how can make it work. Only the search terms become this. Any solution?
Updated: This is the search form that i have(this is a searchbox apply to my multisite).
<div class="search">
<form name="searchform" onsubmit="return !!(validateSearch() && dosearch());" method="get" id="searchform">
<input type="text" name="searchterms" class="terms" id="terms" placeholder="<?php if (is_search()) { ?><?php the_search_query(); ?><?php } elseif (is_home() || is_single() || is_page() || is_archive() || is_404()) { ?>What are you searching for?<?php } ?>">
<select name="sengines" class="state" id="state">
<option value="" selected>Select a State</option>
<?php $bcount = get_blog_count();
global $wpdb;
$blogs = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public='1'"));
if(!empty($blogs)){
?><?php
foreach($blogs as $blog){
$details = get_blog_details($blog->blog_id);
if($details != false){
$addr = $details->siteurl;
$name = $details->blogname;
if(!(($blog->blog_id == 1)&&($show_main != 1))){
?>
<option value="<?php echo $addr; ?>?s="><?php echo $name;?></option>
<?php
}
}
}
?><?php } ?>
</select>
<input name="Search" type="submit" value="Search" class="button3">
</form>
</div><!--search-->
Javascript for the search form
function dosearch() {
var sf=document.searchform;
var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value);
window.location.href = submitto;
return false;
}
function validateSearch(){
// set some vars
var terms = document.getElementById('terms');
var state = document.getElementById('state');
var msg = '';
if(terms.value == ''){
msg+= 'We were unable to search without a keyword! \n';
}
else if(terms.value.length < 3){
msg+= 'Keyword is too short! \n';
}
else if(terms.value.length > 25){
msg+= 'Keyword is too long! \n';
}
else if(state.value == ''){
msg+= 'Select state to proceed! \n';
}
// SUbmit form part
if(msg == ''){
return true;
}else{
alert(msg);
return false;
}
}