1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-11-30 04:19:49 +01:00
ext-pq/tests/encoding001.phpt
2014-09-17 09:17:13 +02:00

30 lines
501 B
PHP

--TEST--
encoding
--SKIPIF--
<?php include "_skipif.inc"; ?>
--FILE--
<?php
echo "Test\n";
include "_setup.inc";
$c = new pq\Connection(PQ_DSN);
var_dump($c->encoding);
$c->encoding = "utf8";
var_dump($c->encoding);
$c->exec("SELECT 'ßüpä…'")->fetchCol($val);
var_dump($val);
$tmp = 12345;
$c->encoding = $tmp;
var_dump($c->encoding);
?>
DONE
--EXPECTF--
Test
string(%d) "%s"
string(4) "UTF8"
string(10) "ßüpä…"
Notice: Unrecognized encoding '12345' in %s on line %d
string(4) "UTF8"
DONE