Bug 54697

Summary: ALEF MAKSURA shows up as a square at the middle or at the start of a word
Product: [Unmaintained] kdelibs Reporter: Mohammed Yousif <mhdyousif>
Component: qtAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: elzubeir, roozbeh
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: a screenshot for the bug

Description Mohammed Yousif 2003-02-16 00:49:32 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 2.95.3 
OS:          Linux

If ALEF MAKSURA (0x0649) is at the begining of a word or at the middle of a word a square is shown instead of it.
This patch fixes this problem.

Index: qt-copy/src/kernel/qcomplextext.cpp
===================================================================
RCS file: /home/kde/qt-copy/src/kernel/qcomplextext.cpp,v
retrieving revision 1.20
diff -u -r1.20 qcomplextext.cpp
--- qt-copy/src/kernel/qcomplextext.cpp 17 Dec 2002 15:04:07 -0000      1.20
+++ qt-copy/src/kernel/qcomplextext.cpp 15 Feb 2003 23:28:15 -0000
@@ -305,7 +305,7 @@
     { 0xFEE5, 3 }, // 0x0646    D       NOON
     { 0xFEE9, 3 }, // 0x0647    D       HEH
     { 0xFEED, 1 }, // 0x0648    R       WAW
-    { 0x0649, 0 }, // 0x0649            ALEF MAKSURA // ### Dual, glyphs not consecutive, handle in code.
+    { 0x0649, 1 }, // 0x0649
     { 0xFEF1, 3 }, // 0x064A    D       YEH
     { 0x064B, 0 }, // 0x064B
     { 0x064C, 0 }, // 0x064C
Comment 1 Mohammed Yousif 2003-02-16 00:57:26 UTC
Created attachment 971 [details]
a screenshot for the bug
Comment 2 Roozbeh Pournader 2003-02-18 20:52:49 UTC
This is not a bug. The square is due to a non-existing glyph in your font.
Choose a font that contains initial and medial glyphs for ALEF MAKSURA, and all
will be OK.

See <http://www.unicode.org/Public/UNIDATA/ArabicShaping.txt>:

   0649; ALEF MAKSURA; D; YEH
                       ^
This means that ALEF MAKSURA is a dual-joining letter, and has initial and
medial forms. Qt is correct and standard-conformant here.
Comment 3 Mohammed Elzubeir 2003-02-18 21:55:49 UTC
Interesting. I don't know about other languages, but the standard is wrong if it
thinks the ALEF MAKSURA can have any other shape but final or stand-alone.
Comment 4 Roozbeh Pournader 2003-02-18 22:12:14 UTC
The standard is not wrong. From an explanation I posted to
'developer@arabeyes.org' mailing list last December
<http://lists.arabeyes.org/archives/developer/2002/December/msg00173.html>:

The Alef Maksura sometimes appears in initial and medial forms. The two 
standard examples are some verses of Koran where it is used in the middle 
of a word with a Superscript Alef over it, and the languages Uighur, 
Kazakh, and Kirghiz which use it. (Actually Unicode has the prsentation 
form of initial and medial Alef Maksura at U+FBE8 and U+FBE9. It would 
have been very weird if there was a way to encode it using the 
Presentation Forms but not normal Arabic.)
Comment 5 Mohammed Yousif 2003-02-19 07:13:45 UTC
I would like to explain something about the Qur'an: 
 1- The Qur'an was written for the first time at the days of Othman Ibn Haffan. 
     It was not written before that as people were using to remember it from 
     the mouth of the messenger (Mohammed - halihe assalato wa assalam). 
 2- Othman Ibn Haffan collected the Qur'an and then added it to what we call 
      today "Mushaf" and called it "Mushaf Othmani" 
 3- Othman Ibn Haffan used what we call "Othmani script" in writing "Mushaf 
      Othmani", it's worth noting that he did so before Abou Al-Aswad Al-Du'ali 
       time (the one who added dots to arabic letter to easily differentiate between 
       similar letters like Ra'a and Zai as they were having the same symbol but he 
       added a dot above Zai to differntiate between them). 
 3- Due to muslims not wanting to alter any trivial thing from the Qur'an they 
      kept using "Mushaf Othmani" which is written using "Othmani script" but 
      however they added the dots to it because people who are not arabic 
      speakers were finding it hard to read the Qur'an and even read it 
      incorrectly. 
 4- Othmani Script is NOT used in ANYTHING else but Qur'an and the Arabic 
      language you know is sligtly different from Othmani Script (different only 
      in the way symbols look like) and thus you can use any Arabic rule on it 
      (which includes grammar, Sarf, Balagha and everything) but you can't use 
      all of its symbols as Arabic because some of them is noy related to what we 
      call Arabic and were in the Qur'an just to note some occasions. 
 5- The example you are talking about is absolutely not correct even for Othmani 
      Script, Alef Maksura is pronnounced very similar to Alef Mad so how can you 
      put that in the start of a word? I'm asking you to give me _one_ word in 
      Arabic that have that (even in Othmani Script there is nothing like that). 
      As for the medial form: In othmani script (and only othmani script) Alef Madd 
      if seen in the middle of a word (let's say Arrahman, the a before the n is Alef 
      Madd) the Alef Madd is removed and a super script symbol (it looks exactly 
      like the hini digit '1') is put between the previous and the next letter. 
      This is only in Othmani Script and is not applied to _anything_ else (this is 
      why Othmani Script cannot pass an Arabic spell checker test) 
      But for Alef Maksura (neither Arabic we use nor Othmani Script has that as 
      medial) and it seems you confused Alef Madd with Alef Maksura in that issue. 
      Does this means that Alef Madd has medial form? no, this is correct for 
      Othmani Script _only_ and is not right for _anything_else. 
 
This is coming from my mouth? no, there is standard for Arabic put by "Mugamah 
Allogha Al-Arabia" in Egypt and all arab countries follow that and all other 
standards (including unicode) should obey that and leave setting arabic rules to 
"Mugamah Allogha Al-Arabia". 
 
PS: There is no single Arabic font that has glyphs for the so-called medial and 
      initial Alef Maksura. 
 
I'm sorry if anyone found this offending. 
 
Comment 6 Roozbeh Pournader 2003-02-19 08:29:14 UTC
I'm sorry Mohammed Yousif, but this discussion is off-topic here in the KDE bugs
database. Qt is following Unicode here, and intentionnaly, since this is clearly
specified in Unicode. If you think Unicode should be fixed with regard to ALEF
MAKSURA, please post your comments to the Unicode mailing list. Information is
available at <http://www.unicode.org/consortium/distlist.html>. If you need to
find about fonts that support the medial and initial forms of ALEF MAKSURA,
asking the same mailing list should be OK.

As far as Qt is concerned, this is not a bug. It's a feature.
Comment 7 John Firebaugh 2003-03-03 06:04:16 UTC
See discussion