Created
December 26, 2016 10:58
-
-
Save iakio/701e90d70f4684d5055668e8af0e5d68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--TEST-- | |
Hello | |
--FILE-- | |
<?php | |
$conn = new PDO("pgsql:options='-c client_encoding=utf8'", "postgres"); | |
$stmt = $conn->query("show client_encoding"); | |
echo $stmt->fetchColumn(0), PHP_EOL; | |
$conn = new PDO("pgsql:options='-c client_encoding=sql_ascii'", "postgres"); | |
$stmt = $conn->query("show client_encoding"); | |
echo $stmt->fetchColumn(0), PHP_EOL; | |
--EXPECT-- | |
UTF8 | |
SQL_ASCII |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment