Fix bug in foldEQ_utf8_flags()
authorKarl Williamson <khw@cpan.org>
Sun, 23 Dec 2018 20:05:33 +0000 (13:05 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 25 Dec 2018 16:08:11 +0000 (09:08 -0700)
We need to pass the flag that says to not allow non-ASCII characters to
fold to ASCII on to the code that actually does it.  There are
apparently no current errors that arise from this bug, but a future
commit would otherwise expose this problem.

utf8.c

diff --git a/utf8.c b/utf8.c
index 9095cda..960f1e4 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -5518,6 +5518,9 @@ Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1,
             flags_for_folder |= FOLD_FLAGS_LOCALE;
         }
     }
+    if (flags & FOLDEQ_UTF8_NOMIX_ASCII) {
+        flags_for_folder |= FOLD_FLAGS_NOMIX_ASCII;
+    }
 
     if (pe1) {
         e1 = *(U8**)pe1;