Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

If on hosting the default is set to character_set_database do not utf8


Print Track
On non-English hosting, it happens that the default database is not UTF8, but for example cp1251 or another. I initially did not know how to solve the problem with the encoding through the pdo_functions_include.php file. Solved the problem like this:
instead
$pdo = dbconnection(new PDO("mysql:host=".$db_host.";dbname=".$db_name.";charset=utf8mb4;port=".$db_port, $db_user, $db_pass));

replace
$pdo = dbconnection(new PDO("mysql:host=".$db_host.";dbname=".$db_name.";charset=utf8mb4;port=".$db_port, $db_user, $db_pass, [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_ci'"]));

I recommend to do so in the distribution.

12 replies

V8.00.19 already has utf8mb4 also v9.03 wink
You misunderstood. The fact is that without this array in pdo_functions_include.php, when installed, the characters (not english) turn into cracks. - If the hosting haracter_set_database default is not utf8.
I have this in header.php (php fusion v7.03) so it will render properly.
header("Content-Type: text/html; charset=".$locale['charset'].""); 


Does this work for you?
header("Content-Type: text/html; charset=".$locale['charset']);


Is present in 8 so that would not be it, PDO has been updated as per suggestion so we´ll see if it works ok for everyone.
Wanabo, You are talking about displaying text. Here we are talking about writing encoding to tables. If the text is incorrectly recorded in the table, it will not be displayed correctly, regardless of the properties and values of html.
How to fix incorrect Cyrillic phpMyAdmin entry? Any tips ..
zizub, Have you changed the file as described above?
Not. I used version 8.00.21 with github to update. In this version, the pdo_functions_include.php file has already been modified. I missed these versions 8.00 / 8.19 / 8.20.
In my php-fusion 7.02.07, in phpMyAdmin the encoding is latin1, the Cyrillic text is written incorrectly for news and articles. But everything is fine on the site, everything is shown correctly.
After upgrading to version 8.00.21 with github, the phpMyAdmin encoding is utf8mb4_unicode_ci, the Cyrillic text is written incorrectly for the news. But now everything is bad on the site, the text looks the same as in phpMyAdmin is wrong.
zizub, In fact, Latin1 is not suitable for Cyrillic, therefore it is displayed in this way. I had the exact same problem on PHP Fusion 6. You need to transcode the base to utf8mb4. How to do this, look in Google.
zizub has replied to this - 5 months ago

Oleg wrote:

@Oleg - zizub, In fact, Latin1 is not suitable for Cyrillic, therefore it is displayed in this way. I had the exact same problem on PHP Fusion 6. You need to transcode the base to utf8mb4. How to do this, look in Google.

Thank you. Your advice helped me, I replaced latin1 with utf8mb4 and did the update all over again. Now the cyrillic text in phpMyAdmin is correct. The site also displays news and articles well. There is a slight distortion of the text in the admin panel. Basically, these are new features that were not in pf-7 (side navigation in the drop-down list, e-mail templates, language settings, a blog, and more. See photo).
zizub attached the following image:
zizub, you have wrong localization

Rus: вы установили не из той локализации. Я вижу по скринам что вы используете setup.php от PF7, а нужно от PF8. Вот тут мой пост с нужной локализацией. Только чтобы в админке правильно отображался весь текст, нужно либо в phpmyadmin переделать вручную текст или переустановить и снова перекодировать с новой локализацией.
Oleg. - You are right, I could be mistaken and use another file. I also move the site pf-7, simultaneously with the update, from one hosting to another. I have in one folder, for updating, there are many different subfolders and files from different versions. Thanks for the hint to change the text in phpmyadmin. I did not think about that, now I know how to act. Special thanks for the Russian localization of pf-8.
author Oleg
forumSuspected Bugs and Errors - 8
replies13 posts
viewed430 times
activeLast updated on 5 months ago

Related

Default for "Notify via email" doesn't work
Started by Yxos Yxos - 10 posts
Free web PHP Fusion Web hosting
Started by
S
sustek4 - 9 posts
Free PHP MySQL add free Hosting
Started by
B
bmsrykpk - 2 posts
Removal of Main Admin Settings - Default Theme to Theme Admin
Started by Chan Chan - 1 post
Is this forum the default forum?
Started by Tiernan Tiernan - 2 posts
Field 'online_browser' doesn't have a default value
Started by hervan hervan - 5 posts

Hot Questions

Druid
Latest Comment Panel
Druid - 7 posts
Basti
N
Incorrect Validation Code
Nomak - 25 posts
B
Index.php always broken
bobesama - 19 posts
starefossen
PHP 5.3/6 Comparability Problems
starefossen - 8 posts
R
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: Falk, Wanabo, zizub, Oleg, RobiNN