php代码如下:
$pg=pg_connect("host=192.168.0.43 user=postgres password=postgres dbname=mydb  port=5432");$sql="set client_encoding to utf8;insert into biao values('好','0909')";
$result=pg_query($pg,$sql);
if ($result)
{echo "sucessfully";
echo pg_affected_rows($result);
}
结果页面报错
Warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid byte sequence for encoding "UTF8": 0x8d HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ps.php on line 54