From: Jarkko Hietaniemi Date: Thu, 25 Oct 2001 00:25:55 +0000 (+0000) Subject: This takes care of some of the re 'debug' cases but X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a989385fb4c3a4b3897772a46cb6192916684fd;p=p5sagit%2Fp5-mst-13.2.git This takes care of some of the re 'debug' cases but not all cases since the information whether the pattern or the target are utf8 seems to be either lost or not spread widely enough, sigh. p4raw-id: //depot/perl@12631 --- diff --git a/regcomp.c b/regcomp.c index 928ffb4..6095aac 100644 --- a/regcomp.c +++ b/regcomp.c @@ -4411,10 +4411,11 @@ Perl_regprop(pTHX_ SV *sv, regnode *o) if (k == EXACT) { SV *dsv = sv_2mortal(newSVpvn("", 0)); - char *s = 0 ? + bool do_utf8 = PL_reg_match_utf8; + char *s = do_utf8 ? pv_uni_display(dsv, (U8*)STRING(o), STR_LEN(o), 60, 0) : STRING(o); - STRLEN len = 0 ? + STRLEN len = do_utf8 ? strlen(s) : STR_LEN(o); Perl_sv_catpvf(aTHX_ sv, " <%s%.*s%s>",