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.
Not a member yet? Click here to register.
Forgot Password?

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

Asked Modified Viewed 1,481 times
O
Oleg
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
asked
Junior Member

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.
Edited by Oleg on 04-02-2019 12:30,
0 replies

11 posts

R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

V8.00.19 already has utf8mb4 also v9.03 wink
0 replies
O
Oleg
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

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.
Edited by Oleg on 04-02-2019 18:21,
0 replies
W
Wanabo
W
Wanabo 10
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.
  • Senior Member, joined since
  • Contributed 598 posts on the community forums.
  • Started 94 threads in the forums
answered
Senior Member

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?
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

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.
0 replies
O
Oleg
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

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.
Edited by Oleg on 08-02-2019 09:39,
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
answered
Member

How to fix incorrect Cyrillic phpMyAdmin entry? Any tips ..
0 replies
O
Oleg
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

zizub, Have you changed the file as described above?
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
answered
Member

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.
Edited by zizub on 11-02-2019 02:08,
0 replies
O
Oleg
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

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.
Edited by Oleg on 11-02-2019 08:15,
1 reply
O
Oleg
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
answered
Junior Member

zizub, you have wrong localization

Rus: вы установили не из той локализации. Я вижу по скринам что вы используете setup.php от PF7, а нужно от PF8. Вот тут мой пост с нужной локализацией. Только чтобы в админке правильно отображался весь текст, нужно либо в phpmyadmin переделать вручную текст или переустановить и снова перекодировать с новой локализацией.
Edited by Oleg on 11-02-2019 18:30,
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
answered
Member

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.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 11 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
W
W
Wanabo 10
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.
  • Senior Member, joined since
  • Contributed 598 posts on the community forums.
  • Started 94 threads in the forums
Z
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
O
O
Oleg 10
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 10 threads in the forums
  • Started this discussions
R
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet