AH-dark / epay-migrator

Build and upgrade the EPay system database schema with a Go application
GNU Affero General Public License v3.0
0 stars 0 forks source link

Bug: EPay PHP 数据库中文编码错误 #2

Closed AH-dark closed 1 year ago

AH-dark commented 1 year ago

使用此 migrator insert 的中文字符不能被 epay 系统读取,会出现乱码,疑似编码错误。

AH-dark commented 1 year ago

需要更改 includes/lib/PdoHelper.php 的 pdo dsn 部分:

$config = [
  'dsn' => sprintf('mysql:host=%s;port=%d;dbname=%s;charset=utf8', DATABASE_HOST, DATABASE_PORT, DATABASE_NAME),
  'user' => DATABASE_USER,
  'password' => DATABASE_PASSWORD,
  'timeout' => 5,
];