diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-07 04:44:05 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-07 04:44:05 +0000 |
commit | c728cb41064fc29351e896c61d746060cee08d64 (patch) | |
tree | 3fa8c5e0794612f27141bbbd29c9e8ad76d6ffa0 /regcomp.c | |
parent | 108481f44f73c82d1f291486a8da7654b4d58fe6 (diff) | |
download | perl-c728cb41064fc29351e896c61d746060cee08d64.tar.gz |
More regex and utf8 debug dumping.
p4raw-id: //depot/perl@14114
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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(); |