Answer the question
In order to leave comments, you need to log in
How to overcome encoding problem in Prestashop?
Good afternoon, we have deployed on prestashop 1.7.5.1 hosting, but faced an encoding problem.
like and utf-8 but in fact part of the text is not available, part of the menu is not displayed correctly.
Base utf8_general_ci, default charset utf-8
Answer the question
In order to leave comments, you need to log in
This happens on some hosting sites, for example, on NetAngels.
Solution suggested by their tech support. Apply prior to installation.
In the file /classes/db/DbPDO.php
comment out the line
return new PDO($dsn, $user, $password, array(PDO::ATTR_TIMEOUT => $timeout, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
and write
$dbh = new PDO($dsn, $user, $password, array(PDO::ATTR_TIMEOUT => $timeout, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
$dbh->exec("set names utf8");
return $dbh;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question