[latex3-commits] [git/LaTeX3-latex3-latex3] main: Avoid NFD of U+037E when case changing (b12205018)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Mar 9 22:43:17 CET 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/b12205018916ea47490ebabfabae3aed0c26cf6b
>---------------------------------------------------------------
commit b12205018916ea47490ebabfabae3aed0c26cf6b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Mar 9 21:43:17 2023 +0000
Avoid NFD of U+037E when case changing
As LGR output something different for the NFD version.
>---------------------------------------------------------------
b12205018916ea47490ebabfabae3aed0c26cf6b
l3kernel/l3text-case.dtx | 11 ++++++++---
l3kernel/testfiles/m3text002.luatex.tlg | 2 ++
l3kernel/testfiles/m3text002.lvt | 1 +
l3kernel/testfiles/m3text002.ptex.tlg | 2 ++
l3kernel/testfiles/m3text002.tlg | 2 ++
l3kernel/testfiles/m3text002.uptex.tlg | 2 ++
l3kernel/testfiles/m3text002.xetex.tlg | 2 ++
7 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/l3kernel/l3text-case.dtx b/l3kernel/l3text-case.dtx
index 243f974d5..90b28cd4b 100644
--- a/l3kernel/l3text-case.dtx
+++ b/l3kernel/l3text-case.dtx
@@ -905,14 +905,19 @@
% although necessarily the implementation is somewhat different. The
% \emph{ypogegrammeni} is filtered out here as it is not actually in the
% Greek range, so gets lost if we leave until later. The one Greek codepoint
-% we skip is the numeral sign: it's got an awkward NFD for \pdfTeX{} so is
-% best left unchanged.
+% we skip is the numeral sign and question mark: the first has an awkward NFD
+% for \pdfTeX{} so is best left unchanged, and the latter has issues concerning
+% how \texttt{LGR} outputs the input and output (differently!).
% \begin{macrocode}
\cs_new:Npn \@@_change_case_upper_el:nnnn #1#2#3#4
{
\bool_lazy_and:nnTF
{ \@@_change_case_if_greek_p:n {#4} }
- { ! \@@_codepoint_compare_p:nNn {#4} = { "0374 } }
+ {
+ ! \bool_lazy_or_p:nn
+ { \@@_codepoint_compare_p:nNn {#4} = { "0374 } }
+ { \@@_codepoint_compare_p:nNn {#4} = { "037E } }
+ }
{
\@@_change_case_if_greek_spacing_diacritic:nTF {#4}
{
diff --git a/l3kernel/testfiles/m3text002.luatex.tlg b/l3kernel/testfiles/m3text002.luatex.tlg
index fc068180b..90c88c75b 100644
--- a/l3kernel/testfiles/m3text002.luatex.tlg
+++ b/l3kernel/testfiles/m3text002.luatex.tlg
@@ -227,6 +227,8 @@ TEST 17: Greek
ΤΟ ΕΝΑ Ή ΤΟ ΑΛΛΟ
ͺ῀`^^b4῾᾽᾿῍῎῝῞῟῏῭΅῁
ͺ῀`^^b4῾᾽᾿῍῎῝῞῟῏῭^^a8῁
+;
+;
============================================================
============================================================
TEST 18: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.lvt b/l3kernel/testfiles/m3text002.lvt
index 532cf7a5d..57d88ba3b 100644
--- a/l3kernel/testfiles/m3text002.lvt
+++ b/l3kernel/testfiles/m3text002.lvt
@@ -224,6 +224,7 @@
\greektest:n { ʹ } \NEWLINE
\greektest:n { Το~ένα~Ή~το~άλλο } \NEWLINE
\greektest:n { ͺ ῀ ` ´ ῾ ᾽ ᾿ ῍ ῎ ῝ ῞ ῟ ῏ ῭ ΅ ῁ } \NEWLINE
+ \greektest:n { ; } \NEWLINE
}
\TESTEXP { Turkish/Azeri }
diff --git a/l3kernel/testfiles/m3text002.ptex.tlg b/l3kernel/testfiles/m3text002.ptex.tlg
index ce5501d9d..c521810ea 100644
--- a/l3kernel/testfiles/m3text002.ptex.tlg
+++ b/l3kernel/testfiles/m3text002.ptex.tlg
@@ -227,6 +227,8 @@ TEST 17: Greek
Το ^^ce^^95να ^^ce^^89 το ^^ce^^91λλο
^^cd^^ba^^e1^^bf^^80`^^b4^^e1^^bf^^be^^e1^^be^^bd^^e1^^be^^bf^^e1^^bf^^8d^^e1^^bf^^8e^^e1^^bf^^9d^^e1^^bf^^9e^^e1^^bf^^9f^^e1^^bf^^8f^^e1^^bf^^ad^^ce^^85^^e1^^bf^^81
^^cd^^ba^^e1^^bf^^80`^^b4^^e1^^bf^^be^^e1^^be^^bd^^e1^^be^^bf^^e1^^bf^^8d^^e1^^bf^^8e^^e1^^bf^^9d^^e1^^bf^^9e^^e1^^bf^^9f^^e1^^bf^^8f^^e1^^bf^^ad^^c2^^a8^^e1^^bf^^81
+^^cd^^be
+^^cd^^be
============================================================
============================================================
TEST 18: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.tlg b/l3kernel/testfiles/m3text002.tlg
index ec9ea596f..543e7780b 100644
--- a/l3kernel/testfiles/m3text002.tlg
+++ b/l3kernel/testfiles/m3text002.tlg
@@ -227,6 +227,8 @@ TEST 17: Greek
^^ce^^a4^^ce^^9f ^^ce^^95^^ce^^9d^^ce^^91 ^^ce^^89 ^^ce^^a4^^ce^^9f ^^ce^^91^^ce^^9b^^ce^^9b^^ce^^9f
^^cd^^ba^^e1^^bf^^80`^^c2^^b4^^e1^^bf^^be^^e1^^be^^bd^^e1^^be^^bf^^e1^^bf^^8d^^e1^^bf^^8e^^e1^^bf^^9d^^e1^^bf^^9e^^e1^^bf^^9f^^e1^^bf^^8f^^e1^^bf^^ad^^ce^^85^^e1^^bf^^81
^^cd^^ba^^e1^^bf^^80`^^c2^^b4^^e1^^bf^^be^^e1^^be^^bd^^e1^^be^^bf^^e1^^bf^^8d^^e1^^bf^^8e^^e1^^bf^^9d^^e1^^bf^^9e^^e1^^bf^^9f^^e1^^bf^^8f^^e1^^bf^^ad^^c2^^a8^^e1^^bf^^81
+^^cd^^be
+^^cd^^be
============================================================
============================================================
TEST 18: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.uptex.tlg b/l3kernel/testfiles/m3text002.uptex.tlg
index 9009f455c..457ce5beb 100644
--- a/l3kernel/testfiles/m3text002.uptex.tlg
+++ b/l3kernel/testfiles/m3text002.uptex.tlg
@@ -227,6 +227,8 @@ TEST 17: Greek
^^ce^^a4^^ce^^9f ^^ce^^95^^ce^^9d^^ce^^91 ^^ce^^89 ^^ce^^a4^^ce^^9f ^^ce^^91^^ce^^9b^^ce^^9b^^ce^^9f
ͺ῀`^^b4῾᾽᾿῍῎῝῞῟῏῭΅῁
ͺ῀`^^b4῾᾽᾿῍῎῝῞῟῏῭^^c2^^a8῁
+;
+;
============================================================
============================================================
TEST 18: Turkish/Azeri
diff --git a/l3kernel/testfiles/m3text002.xetex.tlg b/l3kernel/testfiles/m3text002.xetex.tlg
index fc068180b..90c88c75b 100644
--- a/l3kernel/testfiles/m3text002.xetex.tlg
+++ b/l3kernel/testfiles/m3text002.xetex.tlg
@@ -227,6 +227,8 @@ TEST 17: Greek
ΤΟ ΕΝΑ Ή ΤΟ ΑΛΛΟ
ͺ῀`^^b4῾᾽᾿῍῎῝῞῟῏῭΅῁
ͺ῀`^^b4῾᾽᾿῍῎῝῞῟῏῭^^a8῁
+;
+;
============================================================
============================================================
TEST 18: Turkish/Azeri
More information about the latex3-commits
mailing list.