icu/icu.icu5506.multiplevowels.patch

62 lines
2.9 KiB
Diff

diff -ur icu.orig/source/layout/IndicReordering.cpp icu/source/layout/IndicReordering.cpp
--- icu.orig/source/layout/IndicReordering.cpp 2006-11-10 09:42:44.000000000 +0000
+++ icu/source/layout/IndicReordering.cpp 2006-11-10 09:47:05.000000000 +0000
@@ -423,6 +423,57 @@
state = stateTable[state][charClass & CF_CLASS_MASK];
+ /*for the components of split matra*/
+ if ((charCount >= cursor + 3) &&
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF && chars[cursor + 2] == 0x0DCA)) { /*for 3 split matra of Sinhala*/
+ return cursor + 3;
+ }
+ else if ((charCount >= cursor + 3) &&
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2 && chars[cursor + 2] == 0x0CD5)) { /*for 3 split matra of Kannada*/
+ return cursor + 3;
+ }
+ else if ( (charCount >= cursor + 4) &&
+ (
+ chars[cursor] == 0x0D4D &&
+ (chars[cursor + 1] >= 0x0d15 && chars[cursor + 1] <= 0x0d39) &&
+ chars[cursor + 2] == 0x0D4D && chars[cursor + 3] == 0x0D30
+ )
+ ) {
+ return cursor + 1;
+ }
+ /*for 2 split matra*/
+ else if (charCount >= cursor + 2) {
+ /*for Bengali*/
+ if ((chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09BE) ||
+ (chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09D7) ||
+ /*for Oriya*/
+ (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B3E) ||
+ (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B56) ||
+ (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B57) ||
+ /*for Tamil*/
+ (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BBE) ||
+ (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BD7) ||
+ (chars[cursor] == 0x0BC7 && chars[cursor + 1] == 0x0BBE) ||
+ /*for Malayalam*/
+ (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D3E) ||
+ (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D57) ||
+ (chars[cursor] == 0x0D47 && chars[cursor + 1] == 0x0D3E) ||
+ /*for Sinhala*/
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCA) ||
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF) ||
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DDF) ||
+ (chars[cursor] == 0x0DDC && chars[cursor + 1] == 0x0DCA) ||
+ /*for Telugu*/
+ (chars[cursor] == 0x0C46 && chars[cursor + 1] == 0x0C56) ||
+ /*for Kannada*/
+ (chars[cursor] == 0x0CBF && chars[cursor + 1] == 0x0CD5) ||
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD5) ||
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD6) ||
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2) ||
+ (chars[cursor] == 0x0CCA && chars[cursor + 1] == 0x0CD5))
+ return cursor + 2;
+ }
+
if (state < 0) {
break;
}