summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-04 11:27:57 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-04 11:27:57 +0000
commit7cebcbc0979cbf6a0b15188e491cb65c675adbe5 (patch)
tree29206d61ff40359ac7355e837c450d3c8005da87 /mg.c
parent2e67a71412c87f9c81463c1903862d335ebdcd90 (diff)
downloadperl-7cebcbc0979cbf6a0b15188e491cb65c675adbe5.tar.gz
Add ${^UTF8LOCALE} to give perl space access to PL_utf8locale
p4raw-id: //depot/perl@23741
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index b5a9290923..64d4d254d3 100644
--- a/mg.c
+++ b/mg.c
@@ -715,9 +715,11 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
? (PL_taint_warn || PL_unsafe ? -1 : 1)
: 0);
break;
- case '\025': /* $^UNICODE */
+ case '\025': /* $^UNICODE, $^UTF8LOCALE */
if (strEQ(mg->mg_ptr, "\025NICODE"))
sv_setuv(sv, (UV) PL_unicode);
+ else if (strEQ(mg->mg_ptr, "\025TF8LOCALE"))
+ sv_setuv(sv, (UV) PL_utf8locale);
break;
case '\027': /* ^W & $^WARNING_BITS */
if (*(mg->mg_ptr+1) == '\0')