Hi
I Love daniweb for web solution. I want to make a website using jquery. I want to use jquer POST method for my site.
My sample code is

  $.post("search.php",{word:"good"},function(result){
    $("#content").html(result);

Here the word 'good' will be search in a database using search.php by POST method. I already did that and its working fine.
Problem is that when result is Unicode. Its showing ????????????????? character instead of real UTF-8 character.
My html files top r as below

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="EN" http-equiv="Content-Language">
<meta content="UTF-8" name="Charset">

Can u plz suggest me what should I do?
thanks

use from json_encode to convert each character to a hex code word.
ie:

<script type="text/javascript">
<?php
$f = json_encode("a utf-8 text");
$f = str_replace("\\","%",$f);
$f = str_replace("\"","",$f);
echo "alert(unescape(\"$f\"))";  // convert to normal characters
?>
</script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.