Hi, i am tring to add "翻訳するテキストやWebページ " into a PostgreSQL table, but its shown like this:
"& #32763;""& #35379;"す& #12427;テ& #12461;& #12473;& #12488;& #12420;Web& #12506;& #12540;& #12472;
How can I insert that in proper format?
<?php
$db = pg_connect("host=localhost port=5432 dbname=lang user=password=") or die(":(");
pg_set_client_encoding($db , "UTF-8");
#pg_exec($db,"SET NAMES 'UTF-8'");
#pg_exec($db,"SET CLIENT_ENCODING TO 'UTF-8'");
//$lan=iconv("UTF-8",'ISO-8859-1//TRANSLIT',$_REQUEST['lan']);
$lan=$_REQUEST['lan'];
echo $lan;
if(array_key_exists('sub',$_REQUEST))
{
$sql="INSERT INTO table1 (japan) VALUES('{$lan}')";
pg_query($sql) or die("errot");
}
?>
<html>
<body>
<form action="" method="">
<input type="text" name="lan" />
<input type="submit" name="sub" />
</form>
</body>
</html>