How to install postgresql client charset using PHP PDO level?

It seems that the PHP PosgreSQL PDO driver does not accept the charset parameter.

This does not work (since the doc is missing code at http://www.php.net/manual/en/ref.pdo-pgsql.connection.php ):

$db = new PDO('pgsql:host=localhost;dbname=database;charset=WIN1250', 'user', 'pass'); 

How can I install a chat headset client?

+4
source share
1 answer

I found opportunities to install client charset in the documentation and it seems that the request is running fine:

 SET NAMES 'WIN1250'; 
+3
source

Source: https://habr.com/ru/post/1491186/


All Articles