Wordpress fonts not displaying properly

1.3k views Asked by At

I'm working on a new Wordpress website, and it has both Sinhala and English characters, the charset of the website and the database is UTF-8. However although the English characters are displayed properly the Sinhala characters are displayed as question marks.

I can't seem to find an error, how can I fix it ?

display of the page

3

There are 3 answers

0
Jakir Hossain On

First of all you can select a font file and font-face into your css file. You should write your text Unicode format.

@font-face {
    font-family: myFirstFont;
    src: url(sansation_light.woff);
}

div {
    font-family: myFirstFont;
}
0
Code Salsa On

Just comment these two lines in wp-config.php and check.

define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
0
Vivek On

If you are importing this data from another source, please make sure that the export script does the DB export with UTF8 character set. In my case this was the problem

if the database is mysql use the below line to export the source DB.

mysqldump --default-character-set=utf8 -r{export.sql} -u{uname} -p{pass} {db} -h{server}