Reputation: 35
Well I have created a page in Dreamweaver where I use phpMyAdmin as a database. My page can read Swedish letters which are written in Dreamweaver without any problems but when it retrieves data from the database (phpMyAdmin), it gets wrong. Instead of the Swedish letters it says �. I have encoded with utf- 8
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Also the file is saved as utf-8 and I'm using Google Chrome which uses utf 8.
I've heard that I have to encode the connection with the database with utf-8 also, but I don't know how to do that?
As far as I know the way I connect is by:
<?php require_once('Connections/Audiologiska.php'); ?>
Grateful for answers!
Upvotes: 0
Views: 80
Reputation: 248
On the connection file/class normally i put:
SET NAMES utf8;
And for the database collation i choose utf8_general_ci
Upvotes: 0
Reputation: 1153
Don't forget set charset after connecting to db php mysql charset. Also check if columns has right charset.
Upvotes: 1