|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-25 18:48 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 07:00:01 2025 UTC |
Description: ------------ In PDO DB output incorrectly chatset encoding. My Language Russian, encoding Windows-1251. I select result, and view incorrectly result (bad charset). Reproduce code: --------------- Please insert to file /Db/Adapter/Pdo/Abstract.php on line ~124 next code: // set the PDO connection to perform case-folding on array keys, or not $this->_connection->setAttribute(PDO::ATTR_CASE, $this->_caseFolding); // always use exceptions. $this->_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // set character encoding (this code added) $this->query('SET CHARACTER SET cp1251'); $this->query('SET NAMES cp1251'); } catch (PDOException $e) {