Dhiraagu e-Directory data for download (2008-10-06)

Here is the data from Dhiraagu e-Directory that I had mentioned in my previous post "Phone usage (Maumoon, Political Parties, Government and Businesses)". The data was acquired yesterday and contains all of 338,371 entries (made up of 305,198 mobile numbers, 24423 landline numbers and 8750 island/resort numbers) that was listed on the e-Directory service. It is interesting to note that the total entries now is 114,018 more than the March 2007 data I published earlier. This increase comes from an almost doubling of mobile numbers registered (the March 2007 showed 194,025 mobile numbers)!

Anyway, here's the data. As before, it's presented as a Tab-Separated Values (a.k.a CSV) format file racking up 16.8MB uncompressed. I've Zipped down the file to 5.1MB for easier downloading. The file can be opened in Excel, OpenOffice or imported into Access or any other database.

- Download edirectory-2008-10-06.zip

Enjoy!

Phone usage (Maumoon, Political Parties, Government and Businesses)

I got curious today after reading Hilath's amusing post about an unsolicited SMS message he had received from a mobile phone number registered to DRP's presidential candidate Maumoon Abdul Gayoom. Now, this is a time of intense political competition between the various candidates camps and an originating number on a SMS is pretty easy to spoof, so I'm not sure if it really did originate from the said number (though with the desperation reeking from DRP it seems very likely that it did :-P). But that's not what really struck me...

What got my attention was the fact that there now was a publicly listed mobile phone number registered to Maumoon. I've never before seen a mobile number registered to him listed on the Dhiraagu e-Directory and a quick search through various old snapshots of e-Directory data that I had confirmed that there indeed had been none - atleast none up until early June which was the last e-Directory snapshot I had. Anyway, I grabbed a fresh snapshot of the e-Directory and spent a little while running some interesting queries on the data.

Here is some of what I found:

Numbers listed on e-Directory:
Mobile305198
Landline (Male')24423
Landline (Islands/Resorts)8750
Phones/Customer on Avg2.9


Political parties:
Dhivehi Rayyithunge Party92
Maldivian Democratic Party11
Social Liberal Party6
Adhaalath Party6
Islamic Democratic Party6
Jumhooree Party2
Peoples Party2


Registrants (Top 5):
Dhivehi Raajjeyge Gulhun Pvt. Ltd.833
Maldives Police Services200
State Electric Company Ltd.191
Indira Gandhi Memorial Hospital167
Maldives Customs Service164


Most common names (Top 5):
Mohamed Rasheed1273
Ibrahim Rasheed1250
Ahmed Rasheed1089
Ahmed Mohamed1088
Mohamed Ali1087


Government (Top 5):
Maldives Police Services200
Indira Gandhi Memorial Hospital167
Maldives Customs Service164
Min. of Defence & National Security141
President's Office139


Ministries (Top 5):
Min. of Defence & National Security141
Min. of Atolls Development114
Min. of Health76
Min. of Finance & Treasury76
Min. of Environment Energy and Water67


Businesses (Top 5):
Villa Shipping & Trading Co. Pvt. Ltd.163
Universal Entp. Pvt. Ltd.156
One And Only Reethirah149
One & Only Kanuhura125
Kurumba Village124


And finally...

Maumoon Abdul Gayoom
Mobile16
Landlines3


Note: The information presented was obtained using the entries on the Dhiraagu e-Directory (as available today).

Thaana conversions class for PHP 5 - v0.3

Here is a minor update to my previously released Thaana Conversions class for PHP. This new version adds the function convertUtf8ToEntities() which I had forgotten to include in the previous public release.

The Thaana Conversions class for PHP provides a number of useful functions for the conversion and transliteration of text between various Thaana representation formats.

Functions listing:
- convertUtf8ToUnicodeIntegers()
- convertUtf8ToAscii()
- convertUtf8ToEntities()
- convertEntitiesToUnicodeIntegers()
- convertEntitiesToUtf8
- convertEntitiesToAscii()
- convertUnicodeIntegersToUtf8()
- convertUnicodeIntegersToEntities()
- convertUnicodeIntegersToAscii()
- convertAsciiToUtf8()
- convertAsciiToUnicodeEntities()
- convertAsciiToUnicodeIntegers()


Requires:
PHP 5

License:
Open Source MIT License

Usage:
<?php
$thaana 
= new Thaana_Conversions();
echo 
$thaana->convertEntitiesToAscii('&#1931;&#1960;&#1928;&#1964;&#1920;&#1960;');
echo 
$thaana->convertAsciiToUtf8('rWacje');
?>

Download:
- Thaana_Conversions.zip (v0.3, 4KB)

Drop me a line if you run into trouble with any of the functionality or have comments/queries. Enjoy :-)

Radheef for Ubiquity

Earlier this week, Mozilla Labs released a very interesting (and useful) new extension for Firefox called "Ubiquity". It basically taps into the services provided by web services to integrate them better into the browsing experience. For an introduction to Ubiquity, it'd be best to read the post on the Mozilla Labs blog where the product was launched - the video featured in the post presents quite impressive practical enhancements to the browsing experience made possible by the product.

Radheef for Ubiquity
Radheef for Ubiquity adds the verb 'bas' to Ubiquity to facilitate quick and easy look up of definitions of Dhivehi words from any Thaana web page using the Radheef. To lookup a word you find on a Thaana web page, you can either select the word and bring up Ubiquity. Alternatively, you can type the word in to the Ubiquity command window. The definition results are shown immediately within the Ubiquity command bubble.

To install this, visit the Radheef for Ubiquity page after Ubiquity is installed and follow the normal verb installation steps.

Screenshots:

In use on a selected word on the Unicode-based Jazeera Daily website


In use on a selected word on the Ascii-based Haveeru Daily website. It offers helpful suggestions if no result is available for query word as-is.


Happy browsing :-)

Firefox 3 Thaana display bug: review and fixes

Maldivians who use Firefox would be aware that certain Dhivehi websites, such as Miadhu Online, no longer display the Thaana fonts correctly when they switched to the recently released version 3 of the popular browser. I would like to review the issue for the benefit of Maldivian web developers and put forward some solutions that could be used. Further, I would also like to make available a fix that ordinary web users can themselves use until website owners (or the Firefox developers) fix the issue.

Problem description:
Firefox 3.x series (and the 2.x series as well, to a lesser extent) fails in correctly displaying Thaana in web pages when certain non-Unicode Thaana fonts are applied to the elements using CSS. The same pages, however, render correctly without issue with Internet Explorer, Safari and Opera.

DOCTYPE - One contributing factor seems to be the DOCTYPE of the page. My guess is that this issue may have something to do with quirksmode rendering or standards compliance. The lack of a DOCTYPE in the markup gives correct rendering of the Thaana fonts on the page. However, omission of the DOCTYPE cannot and should not be considered a solution as DOCTYPE is required for most page markup and browsers need the correct DOCTYPE specification to correctly render modern pages.

Font - Another factor seems to be the font file used. The Thaana characters fail to be rendered correctly when almost all of the commonly used Thaana fonts, such as A_Faseyha, A_Waheed and A_Randhoo, are used. However, some fonts do work without issue - A_Ilham for example.

Here are some demo pages to highlight the issues. Each of the pages has three lines of Thaana - first of which is Thaana text enclosed in a font tag specifying a (problematic) Thaana font, the second is a H3 headline which has the font family set to a (problematic) Thaana font using CSS alone, the third is again a H3 headline which has the font family is set to a (problematic) Thaana font using CSS but has the text placed inside a font tag and finally the fourth line has a H3 headline whose font family is set to a (working) Thaana font using CSS alone.
View Thaana on page with: no DOCTYPE, HTML 4.01 DOCTYPE and XHTML 1.0 DOCTYPE.

Developer's fix:
There are two definite solutions that can be easily applied by web developers:
1. Add HTML Font tags around any and all text that is to be displayed in Thaana. Specify the font to be used within the "face" attribute of the Font tags as usual. The flip-side of this method is that it results in a significant increase in page size. Haveeru News seems to have addressed the problem using this method.
eg: <a href="somelink">bwlimIhunc aufulunc</a> should be transformed into <a href="somelink"><font face="a_faseyha">bwlimIhunc aufulunc</font></a>

2. Change font used in the CSS definition to "A_Ilham". It is, perhaps, not as clean and pretty as "A_Faseyha" but until there is a fix to Firefox it will have to do.

A further alternative solution would be for the site owners and developers to take this occasion to shift to Unicode Thaana. It is much more reliable and is the currently recommended method of displaying Thaana on the web. Jazeera Daily, Haama Daily and MvHeadlines, to name a few, are all using Unicode for text display and entry. You can utilize the PHP-based Thaana Conversions class I released to convert the existing non-Unicode Thaana text to Unicode - and you can do such conversion on-the-fly on page requests.

User's fix:
I wrote a quick bookmarklet-based solution several weeks ago for my use after getting annoyed with having to open Internet Explorer to view pages from sites affected by this bug. This solution will, or rather should, work on any affected site and on any computer.

Simply right click on this link - Jaa's Thaana Fix - and select "Bookmark this link" from the drop-down menu. Alternatively, you can drag and drop the link onto your bookmarks toolbar. When you are on a page that is messed up by the bug, such as Miadhu Online, Vaikaradhoo Live or Kavaasaa, click the "Thaana fix" link on your Bookmarks menu or toolbar. You will need to do this for each page you view.

Happy reading :-)