From: Hugo van der Sanden Date: Mon, 1 Jul 2002 13:28:05 +0000 (+0100) Subject: -Dr and unicode X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d103360b8581685282078776ac5692a3521f9a95;p=p5sagit%2Fp5-mst-13.2.git -Dr and unicode Message-Id: <200207011228.g61CS5r06772@crypt.compulink.co.uk> p4raw-id: //depot/perl@17391 --- diff --git a/regcomp.c b/regcomp.c index 6b17be1..7b9f53f 100644 --- a/regcomp.c +++ b/regcomp.c @@ -4882,9 +4882,13 @@ Perl_pregfree(pTHX_ struct regexp *r) if (!r || (--r->refcnt > 0)) return; DEBUG_r({ - char *s = pv_uni_display(dsv, (U8*)r->precomp, r->prelen, 60, - UNI_DISPLAY_REGEX); - int len = SvCUR(dsv); + int len; + char *s; + + s = (r->reganch & ROPT_UTF8) ? pv_uni_display(dsv, (U8*)r->precomp, + r->prelen, 60, UNI_DISPLAY_REGEX) + : pv_display(dsv, (U8*)r->precomp, r->prelen, 0, 60); + len = SvCUR(dsv); if (!PL_colorset) reginitcolors(); PerlIO_printf(Perl_debug_log,