I have not updated this for a while, as I found unicode was incomplete with regard to displaying the Qur'an. As unicode was the method I was using for encoding, it did not appear that I was on the right path.
I had one of those aha moments (I shall not use revelation in this context) the other night when I realised the flaw in my approach. It is not just unicode which is insufficient, it is also the method used to draw fonts.
Unicode can, but does not at present, manage the choice between the final form of mim, the choice of sukun forms and the alif hints, but the rendering method cannot handle vowel marks above both the lam and alif of a lam-alif combination.
What is required is a rules based approach to rendering the complete Quran'ic script. I hope to be able to devote some time to this in the near future. I shall not use unicode, but a tag system, which can be translated into the best unicode present as (or if) it evolves.
The opening will be encoded something like this:
In the time since I began this, someone else has created another unicode rendering, which I shall compare to the versions I currently have and hopefully use it as a more accurate rendering. My approach this time will be to use the yusuf ali translation as the seed, marking out phrases within the arabic unicode, and holding both in a database, along with the markup. I am hoping this approach will save me a lot of work by avoiding having to rework the arabic markup for re-used phrases.
Many think they have the key to the puzzle, but it remains the most mystifying part of the Qur'an.
What does it mean, Alif-Lam-Mim?
A one thousand four hundred year old conundrum, but can it be solved? And are we meant to solve it?
The Qur'anic code
Much has been written about the letters prefixing some of the surahs (chapters) in the Qur'an (Koran). However, none of this writing has produced a definitive answer about what these letter prefixes mean. Some have accepted that they are an unsolvable mystery known only to God; others have delved into numerical analysis and 'discovered' that everything in the Qur'an is somehow divisible by nineteen.
I accept neither that the mystery is unsolvable, nor that everything is divisible by nineteen, despite the huge amount of '19' related miracles found. Having worked for three years on another cunning mystery, I found it amazing what people discovered that wasn't actually there (myself included). The problem with 19 is that every 19th investigation will yield something divisible by 19. This does not make each one a miracle, even though some of the findings do indeed appear to be so.
What is the Qur'an?
It is the word of God, the holy book of Islam and the final revelation to mankind. It was delivered over a period of twenty two years, between 610 and 632 AD, through the prophet Mohammed. Only after his death was the Qur'an written down, though instructions for its compilation from an otherwise oral tradition were left by the Prophet.
Many confounding theories over the correctness of the text exist. Some claim there were seven different readings, others that parts were forgotten, and that they were meant to be forgotten as they were superseded by subsequent revelation. One claim is that two verses were added at the end of Surah 9 by the compilers, to honour the Prophet. Each of these, and many more claims, are supported by the practices, recollections and sayings of the prophet and his companions, recorded and known as the Sunnah (actions of the Prophet) and Hadith (sayings of the Prophet).
What is the code?
The Qur'an is composed of 114 surahs. Some of these surahs are prefixed with between 1 and 5 arabic letters, as shown in the table below.
The arabic alphabet is composed of 29 letters including Hamza, and 29 of the 114 surahs are prefixed with 14 of these letters. The alphabet is shown below, reading right to left. Alif is the first letter, and Ya the last. Hamza is shown after the Ya.
The prefixed letters have been suggested to be phonetic sounds, keys, letter values and gematical (or gematrial) values. Gematria is the assignation of numerical values to alphabetic letters: a system in use long before we had arabic (0 to 9) numerals. They are called arabic as they came to Europe through the Islamic Mathematician Al Khwarizami, although he got them from the Hindus.
In the days before arabic numerals, the islamic alphabet itself had a different letter order from that shown above, so the gematical/gematrial values are as follows. Gematria applies equally to many alphabets before arabic numerals, i.e. greek, latin and hebrew. gematria does not extend to Roman numerals I=1, V=5, X=10, C=100 etc, which originated similarly to tally marks, but the idea is the same - a letter represents a number.
Numbers and prefixes in other traditions
114 is the same number as the sayings of Jesus in the Gospel of Thomas, a comparatively rough rendering of Christ's sayings, thought by some to be the 'Q' book from which other gospels were derived. I have also heard mention of the psalms of David being prefixed with letter 'codes'. 19 is considered a foundational number in Buddhism, and it is a prime number.
The long first step
To be able to analyze the Qur'an it must be computerized and done so accurately.
Rendering the Qur'an in unicode is a particularly difficult task for two reasons:
A few gotchas I have come across
The result is far from ideal when compared to a modern Qur'an, but according to some sources, the original rendered Qur'an had no hamzas, no pronunciation marks, and in some cases no dots to help differentiate the letters. Some of these early Qur'ans are available for viewing at the British Library's website (http://www.bl.uk)
Here is the output so far in XML with three english translations from Yusuf Ali, Shakir and Pickthall. Completed Surahs show as a hyperlink. Those not yet completed are plain text.
|1. Al Fatiha - The Opening|
|2. Al Baqarah - The Heifer|
|3. Al Imran - The Family of Imran|
|4. An Nisaa - The Women|
|5. Al Ma'ida - The Table Spread|
|6. Al An'am - Cattle|
|7. Al A'raf - The Heights|
|8. AL Anfal - Spoils of War|
|9. At Tauba - Repentance, or Baraat - Immunity|
|10. Yunus - Jonah|
|11. Hud - The Prophet Hud|
|12. Yusuf - Joseph|
|13. Al Ra'd - The Thunder|
|14. Ibrahim - Abraham|
|15. Al Hijr - The Rocky Tract|
|16. An Nahl - The Bee|
|17. Bani Israil - The Children of Israel, or Al Isra - The Night Journey|
|18. Al Kahf - The Cave|
|19. Maryam - Mary|
|20. Ta Ha|
|21. Al Anbiyaa - The Prophets|
|22. Al Hajj - The Pilgrimage|
|23. Al Muminun - The Believers|
|24. An Nur - Light|
|25. Al Furqan - The Criterion|
|26. Ash-Shu'araa - The Poets|
|27. An Naml - The Ants|
|28. Al Qasas - The Narration|
|29. Al 'Ankabut - The Spider|
|30. Ar Rum - The Romans|
|31. Luqman - Luqman the Wise|
|32. As Sajdah - Adoration|
|33. Al Ahzab - The Confederates|
|34. Saba - Sheba|
|35. Fatir - Originator, or Malaika - The Angels|
|36. Ya Sin|
|37. As Saffat - Those Ranged in Ranks|
|39. Az Zumar - The Groups|
|40. Al Mumin - The Believer|
|41. Ha Mim, or Fussilat|
|42. Ash Shura - The Consultation|
|43. Az Zukhruf - Gold Adornments|
|44. Ad Dukhan - Smoke, or Mist|
|45. Al Jathiya - Bowing the Knee|
|46. Al Ahqaf - Winding Sand Tracts|
|48. Al Fath - Victory|
|49. Al Hujurat - The Inner Apartments|
|51. Az Zariyat - The Winds that Scatter|
|52. At Tur - The Mount|
|53. An Najm - The Star|
|54. Al Qamar - The Moon|
|55. Al Rahman - The Most Gracious|
|56. Al Waqi'a - The Inevitable Event|
|57. Al Hadid - Iron|
|58. Al Mujadila - The Woman who Pleads|
|59. Al Hashr - The Gathering|
|60. Al Mumtahana - The Woman to be Examined|
|61. As Saff - Battle Array|
|62. Al Jumu'a - The Assembly (Friday) Prayer|
|63. Al Munafiqun - The Hypocrites|
|64. Tagabun - Mutual Loss and Gain|
|65. At Talaq - Divorce|
|66. At Tahrim - Holding something to be forbidden|
|67. Al Mulk - Dominion|
|68. Al Qalam - The Pen, or Nun|
|69. Al Haqqa - The Sure Reality|
|70. Al Ma'arij - The Ways of Ascent|
|71. Nuh - Noah|
|72. Al Jinn - The Jinn|
|73. Al Muzzammil - Folded in Garments|
|74. Al Muddathir - One Wrapped Up|
|75. Al Qiyimat - The Ressurection|
|76. Ad Dahr - Time, or Al Insan - Man|
|77. Al Mursalat - Those Sent Forth|
|78. An Nabaa - The Great News|
|79. An Nazi'at - Those who Tear Out|
|80. 'Abasa - He Frowned|
|81. At Takwir - The Folding Up|
|82. Al Infitar - The Cleaving Asunder|
|83. At Tatfif - Dealing in Fraud|
|84. Al Inshiqaq - The Rending Asunder|
|85. Al Buruj - The Signs of the Zodiac|
|86. At Tariq - The Night Visitant|
|87. Al A'la - The Most High|
|88. Al Gashiya - The Overwhelming Event|
|89. Al Fajr - Dawn|
|90. Al Balad - The City|
|91. Ash Shams - The Sun|
|92. Al Lail - The Night|
|93. Ad Dhuha - The Glorious Morning Light|
|94. Al Inshirah - The Expansion|
|95. At Tin - The Fig|
|96. Iqraa - Read, or Al Alaq - The Leech-like Clot|
|97. Al Qadr - The Night of Power|
|98. Al Baiyina - The Clear Evidence|
|99. Az Zilzal - The Convolution|
|100. Al Adiyat - Those who Run|
|101. Al Qari'a - The Day of Clamour|
|102. At Takathur - Piling Up|
|103. Al Asr - Time through the Ages|
|104. Al Humaza - Scandalmonger|
|105. Al Fil - The Elephant|
|106. Quraish - The Quraish|
|107. Al Ma'un - Neighbourly Needs|
|108. Al Kauthar - Abundance|
|109. Al Kafirun - The Disbelievers|
|110 An Nasr - Help|
|111. Al Lahab - The Flame|
|112. Al Ikhlas - Purity of Faith|
|113 Al Falaq - The Dawn|
|114 An Nas - Mankind|