texlive[60426] Build/source/texk/upmendex: upmendex: support I-Y

commits+takuji at tug.org commits+takuji at tug.org
Sun Sep 5 07:27:47 CEST 2021


Revision: 60426
          http://tug.org/svn/texlive?view=revision&revision=60426
Author:   takuji
Date:     2021-09-05 07:27:47 +0200 (Sun, 05 Sep 2021)
Log Message:
-----------
upmendex: support I-Y ordering in Lithuanian

Modified Paths:
--------------
    trunk/Build/source/texk/upmendex/ChangeLog
    trunk/Build/source/texk/upmendex/fwrite.c

Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog	2021-09-05 00:08:16 UTC (rev 60425)
+++ trunk/Build/source/texk/upmendex/ChangeLog	2021-09-05 05:27:47 UTC (rev 60426)
@@ -1,3 +1,8 @@
+2021-09-05  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* fwrite.c:
+	Support I-Y ordering in Lithuanian.
+
 2021-09-04  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* version 0.59  Beta version.

Modified: trunk/Build/source/texk/upmendex/fwrite.c
===================================================================
--- trunk/Build/source/texk/upmendex/fwrite.c	2021-09-05 00:08:16 UTC (rev 60425)
+++ trunk/Build/source/texk/upmendex/fwrite.c	2021-09-05 05:27:47 UTC (rev 60426)
@@ -740,7 +740,8 @@
 	UChar32 c32;
 	UErrorCode perr;
 	UCollationResult order;
-	static int hanzi_mode=0;
+	UCollationStrength strgth;
+	static int hanzi_mode=0, i_y_mode=0;
 
 	ch=istr[0];
 	*chset=charset(istr);
@@ -883,6 +884,22 @@
 			return;
 		}
 	}
+	if (ch==0x059||ch==0x079) {
+		/* check Y versus I for Lithuanian */
+		if (i_y_mode==0) {
+			strgth = ucol_getStrength(icu_collator);
+			ucol_setStrength(icu_collator, UCOL_PRIMARY);
+			strX[0] = 0x059;  strX[1] = 0x00; /* Y */
+			strZ[0] = 0x049;  strX[1] = 0x00; /* I */
+			order = ucol_strcoll(icu_collator, strZ, -1, strX, -1);
+			if (order==UCOL_EQUAL) i_y_mode=2; else i_y_mode=1;
+			ucol_setStrength(icu_collator, strgth);
+		}
+		if (i_y_mode==2) {
+			ini[0] = 0x049; /* I */
+			return;
+		}
+	}
 	if (ch==0x0C6||ch==0x0E6||ch==0x152||ch==0x153||ch==0x132||ch==0x133
 		||ch==0x0DF||ch==0x1E9E||ch==0x13F||ch==0x140||ch==0x490||ch==0x491) {
 		strX[0] = u_toupper(ch);  strX[1] = 0x00; /* ex. "Æ" "Œ" */



More information about the tex-live-commits mailing list.