]> granicus.if.org Git - icu/commitdiff
ICU-8703 Arabic shaping Shadda handling
authorDina Sayed <dsayed@svn.icu-project.org>
Thu, 27 Sep 2012 09:09:18 +0000 (09:09 +0000)
committerDina Sayed <dsayed@svn.icu-project.org>
Thu, 27 Sep 2012 09:09:18 +0000 (09:09 +0000)
X-SVN-Rev: 32430

icu4c/source/common/ushape.cpp

index c09c13228f4a9df6d0122af202d32dfe7e5361af..e4fb4ab007bd214d72d71699e9642b531f4ff445 100644 (file)
@@ -71,6 +71,7 @@
 #define SHADDA_CHAR        0xFE7C
 #define TATWEEL_CHAR       0x0640
 #define SHADDA_TATWEEL_CHAR  0xFE7D
+#define SHADDA06_CHAR      0x0651
 
 #define SHAPE_MODE   0
 #define DESHAPE_MODE 1
@@ -1294,14 +1295,15 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
                     if( (nextLink&ALEFTYPE) == ALEFTYPE && (lastLink&LAMTYPE) == LAMTYPE ) {
                         Shape = 0;
                     }
-                }
-                else {
+                } else if(tashkeelFlag == 2 && dest[i] == SHADDA06_CHAR){
+                                   Shape = 1;
+                } else {
                     Shape = 0;
                 }
             }
             if ((dest[i] ^ 0x0600) < 0x100) {
                 if ( isTashkeelChar(dest[i]) ){
-                    if (tashkeelFlag == 2){
+                                       if (tashkeelFlag == 2  && dest[i] != SHADDA06_CHAR){
                         dest[i] = TASHKEEL_SPACE_SUB;
                         tashkeelFound  = 1;
                     } else {