I'm using Php5.6.2 And postgres as database connection. postgres is set to UTF-8
i was try to select db, but it return error "SQLSTATE[22021]: Character not in repertoire: 7 ERROR: invalid byte sequence for encoding "EUC_JP": 0xe58e"
$this->db = new PDO("pgsql:host=localhost;dbname=test","cadusr","cadpass");
Some query is working successfully, but some are not. I expect that maybe the fail queries are include Japanese.
Can i get some teaching? Thank you.
Sorry self answer as soon as ask.
Before asking, I found only English web with error message.
But i could find after asking easily Japanese web with keyword PHP PDO pgsql. So, This is solution.
Add this line of code below in host after ip.
options='--client_encoding=UTF8'
new PDO("pgsql:host=localhost options='--client_encoding=UTF8';dbname=test","cadusr","cadpass");
Hope that help you.