1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-12-02 09:18:02 +01:00
ext-pq/tests/encoding001.phpt

30 lines
501 B
Plaintext
Raw Permalink Normal View History

2013-02-14 14:54:22 +01:00
--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);
2013-02-14 14:54:22 +01:00
$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