summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-07 04:44:05 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-07 04:44:05 +0000
commitc728cb41064fc29351e896c61d746060cee08d64 (patch)
tree3fa8c5e0794612f27141bbbd29c9e8ad76d6ffa0 /regcomp.c
parent108481f44f73c82d1f291486a8da7654b4d58fe6 (diff)
downloadperl-c728cb41064fc29351e896c61d746060cee08d64.tar.gz
More regex and utf8 debug dumping.
p4raw-id: //depot/perl@14114
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 3459e0a7ee..07b11ee6dc 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4557,9 +4557,13 @@ Perl_regprop(pTHX_ SV *sv, regnode *o)
if (k == EXACT) {
SV *dsv = sv_2mortal(newSVpvn("", 0));
- bool do_utf8 = DO_UTF8(sv);
+ /* Using is_utf8_string() is a crude hack but it may
+ * be the best for now since we have no flag "this EXACTish
+ * node was UTF-8" --jhi */
+ bool do_utf8 = is_utf8_string((U8*)STRING(o), STR_LEN(o));
char *s = do_utf8 ?
- pv_uni_display(dsv, (U8*)STRING(o), STR_LEN(o), 60, 0) :
+ pv_uni_display(dsv, (U8*)STRING(o), STR_LEN(o), 60,
+ UNI_DISPLAY_REGEX) :
STRING(o);
int len = do_utf8 ?
strlen(s) :
@@ -4750,7 +4754,7 @@ Perl_pregfree(pTHX_ struct regexp *r)
return;
DEBUG_r({
char *s = pv_uni_display(dsv, (U8*)r->precomp, r->prelen, 60,
- UNI_DISPLAY_ISPRINT);
+ UNI_DISPLAY_REGEX);
int len = SvCUR(dsv);
if (!PL_colorset)
reginitcolors();