EBCDIC: character classes must remap the low 256.
Jarkko Hietaniemi [Sun, 3 Feb 2002 17:04:34 +0000 (17:04 +0000)]
p4raw-id: //depot/perl@14534

regcomp.c

index bf4d226..c238f4e 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4065,9 +4065,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
                         STRLEN foldlen;
                         UV f;
 
-                        uvchr_to_utf8(tmpbuf, value);
+                        uvchr_to_utf8(tmpbuf, NATIVE_TO_UNI(value));
                         to_utf8_fold(tmpbuf, foldbuf, &foldlen);
-                        f = utf8_to_uvchr(foldbuf, 0);
+                        f = UNI_TO_NATIVE(utf8_to_uvchr(foldbuf, 0));
 
                         /* If folding and foldable and a single
                          * character, insert also the folded version