I use this code to receive data from an php file
$.ajax({
url: "includes/cpf.inc.php",
type: "POST",
data:{p_request:"1bdd249a5d673a721be31d7444af81af1af4c5b6",
p_userid:"<?php echo $dbu_userid; ?>",
p_curpass:$("#txtcurpass").val(),
p_newpass:$("#txtnewpass").val(),
p_cnewpass:$("#txtcnewpass").val()
},
cache:false,
success:function(msg){
$("#chPassLoad").css("visibility","hidden");
wilPrompt("#chpasStat",msg.substr(0,1),msg.substr(2));
if(msg.substr(0,1)=="0"){
$("#txtcurpass").attr("value","");
$("#txtnewpass").attr("value","");
$("#txtcnewpass").attr("value","");
}
},
beforeSend:function(){
$("#chPassLoad").css("visibility","visible");
}
});
and the data that will be receive from cpf.inc.php contains html entities like this
おはようございます漢字
and that html entities are Japanese characters
おはようございます漢字
now my problem is when I will receive data from the variable msg it returns something like this
pX[hς܂
Is there any code I need to append on the $.ajax parameters to encode this html entities correctly? thanks