summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index d57b52780b..a9600e95b9 100644
--- a/utf8.c
+++ b/utf8.c
@@ -645,7 +645,10 @@ Perl_is_utf8_alnum(pTHX_ U8 *p)
if (!is_utf8_char(p))
return FALSE;
if (!PL_utf8_alnum)
- PL_utf8_alnum = swash_init("utf8", "IsAlnum", &PL_sv_undef, 0, 0);
+ /* NOTE: "IsWord", not "IsAlnum", since Alnum is a true
+ * descendant of isalnum(3), in other words, it doesn't
+ * contain the '_'. --jhi */
+ PL_utf8_alnum = swash_init("utf8", "IsWord", &PL_sv_undef, 0, 0);
return swash_fetch(PL_utf8_alnum, p);
/* return *p == '_' || is_utf8_alpha(p) || is_utf8_digit(p); */
#ifdef SURPRISINGLY_SLOWER /* probably because alpha is usually true */