diff -dupr a/regcomp.c b/regcomp.c
--- a/regcomp.c	2016-07-14 12:08:08.000000000 -0700
+++ b/regcomp.c	2017-10-03 13:05:27.589719134 -0700
@@ -11918,16 +11918,17 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pREx
 	}
         sv_catpv(substitute_parse, ")");
 
-        RExC_parse = RExC_start = RExC_adjusted_start = SvPV(substitute_parse,
-                                                             len);
+        len = SvCUR(substitute_parse);
 
 	/* Don't allow empty number */
 	if (len < (STRLEN) 8) {
             RExC_parse = endbrace;
 	    vFAIL("Invalid hexadecimal number in \\N{U+...}");
 	}
-	RExC_end = RExC_parse + len;
 
+        RExC_parse = RExC_start = RExC_adjusted_start
+                                              = SvPV_nolen(substitute_parse);
+        RExC_end = RExC_parse + len;
         /* The values are Unicode, and therefore not subject to recoding, but
          * have to be converted to native on a non-Unicode (meaning non-ASCII)
          * platform. */