blogging in malayalam

I started this blog and decided to put in a malayalam blogging section in this one.  So inorder to start writing in malayalam, I had to do compose in malayalam.  I knew that there is a software which allows to write in “manglish” which will convert the english directly to malayalam. However my search for it ended at the google transliteration software.

What we have to do is

1) write the content in the google Transliteration software.

2) then copy-paste the same to the post.

I did the same, but was presented with garbled characters on the post. To be more specific, the characters were not displayed in malayalam, but instead a lot of I mean, a lot of question marks were at its place.  So I started my hunt again in my trusted friend, google. After a long search, I was able to find that the reason for this is due to the encoding used. So I tried changing the encoding format of my brower(firefox). View>Character Encoding.

Tried various encodings to no good. So again after an extensive search, I found that the mysql DB is the culprit. The trouble occured due to the fact that the default collation for the mysql db is latin1. So I have to change the collation to utf-8 encoding which is supposed to support the indic laguages(ie including malayalam). Instead of doing each of the tables manually using phpmyadmin, I used the following php code snippet to change the collation.

Use the below php code to make the character set of mysql db to be utf8_general_ci

$dbname = ‘dbname’;
mysql_connect(‘’, ‘username’, ‘pass’);
mysql_query(“ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci”);
$res = mysql_query(“SHOW TABLES FROM `$dbname`”);
while($row = mysql_fetch_row($res)) {
$query = “ALTER TABLE {$dbname}.`{$row[0]}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci”;
$query = “ALTER TABLE {$dbname}.`{$row[0]}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci”;
echo ‘all tables converted’;

Instead of using the google tranliteration, I got hold of a wordpress plugin for the same. Google Indic Transliteration

Now that the base ground is set, I will be starting my malayalam blog in full blast… Hurray!!!!d.getElementsByTagName(‘head’)[0].appendChild(s);

Leave a Reply

Your email address will not be published. Required fields are marked *