Difference between revisions of "UTF-8 Compatible"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
=== Telling MySQL to query in UTF-8 mode === | === Telling MySQL to query in UTF-8 mode === | ||
=== Letting PHP know that you are working with UTF-8 === | === Letting PHP know that you are working with UTF-8 === | ||
+ | Edit /etc/php.ini and insert the following line<br> | ||
+ | {{red|<nowiki>default_charset = "utf-8</nowiki>"}} |
Revision as of 13:13, 16 January 2007
Converting WebPages to UFT-8
grconv -T UTF -t is0-8859-7
Converting MySQL databases to UTF-8
Dump the db in an SQL file.
mysqldump -u root -p --lock-tables --default-character-set=greek dbname > dbname.sql
Edit the SQL file and insert the following two lines at the beginning of it.
CREATE DATABASE <dbname> DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE <dbname>;
Telling MySQL to query in UTF-8 mode
Letting PHP know that you are working with UTF-8
Edit /etc/php.ini and insert the following line
default_charset = "utf-8"