Hi,
I'm trying to migrate a php website from Plesk to KeyHelp and I'm having some weird characteres showing on the website (check print).
Not sure what should I have to do. I already exported SQL from Plesk a few times, then tried to import to KeyHelp (phpmyadmin), changed to utf8, and no results.
Seems that in the database those characters are fine. In the website (some places) shows with wrong characteres.
utf8 problems
Re: utf8 problems
Hello,
here some hints to ensure proper UTF-8 usage:
1) Use PHP-Header:
2) Use HTML meta tag
3) Set the database connection charset when connecting to the database (Choose one, depending on your application):
mysqli_set_charset / SET NAMES utf8 / PDO-DSN connection string "mysql:host=...;port=...;dbname=...;charset=utf8;"
4) Check the database charset of the database / tables (eg. with phpMyAdmin)
There are more places to check, depending on you application.
here some hints to ensure proper UTF-8 usage:
1) Use PHP-Header:
Code: Select all
header('Content-Type: text/html; charset=UTF-8');
Code: Select all
<meta charset="utf-8">
3) Set the database connection charset when connecting to the database (Choose one, depending on your application):
mysqli_set_charset / SET NAMES utf8 / PDO-DSN connection string "mysql:host=...;port=...;dbname=...;charset=utf8;"
4) Check the database charset of the database / tables (eg. with phpMyAdmin)
There are more places to check, depending on you application.
Mit freundlichen Grüßen / Best regards
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: utf8 problems
I think he got the solution.
Gruß,
Tobi
-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
Tobi
-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser