A
A
Anton Ulanov2019-04-16 14:35:43
Prestashop
Anton Ulanov, 2019-04-16 14:35:43

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

1 answer(s)
I
ITLandgraf, 2019-04-16
@antonsr98

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 question

Ask a Question

731 491 924 answers to any question