Reputation: 1664
I copy pasted a certain paragraph from another site and the outcome had question marks in it such as
animal�ideally
My server is set to iso-8859-1 apparently and my meta tag is saying set charset to utf-8.
I have never worked with charsets and don't know what it is besides what I've been researching about it.
If I exit the content out of the database or directly upon submission it contains the ? marks. What is the procedure or course of action I must take to make these question marks disappear?
REading other posts said in mysql_query do
mysql_query("SET NAMES 'UTF8');
I did that, and it still didn't help.
What do I do ? Thank you.
Upvotes: 0
Views: 71
Reputation: 329
If you are using phpmyadmin you need to change Character Set as utf8_general_ci. You can visit this page: Change default Charset
Upvotes: 1
Reputation:
to show UTF8 characters in your page you need to set the charset for your page:
<meta charset="utf-8">
if you want to save such characters into database, database be UTF8 also:
CREATE TABLE foo
(
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
...
) CHARACTER SET utf8 COLLATE utf8_general_ci
you'll also need to set the php for utf8: (at top)
header("Content-Type: text/html; charset=UTF-8\n");
Upvotes: 1