ccflags, not ldflags.
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index e6d7abc..46f87dd 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1537,7 +1537,7 @@ S_scan_const(pTHX_ char *start)
                }
                continue;
 
-           /* \N{latin small letter a} is a named character */
+           /* \N{LATIN SMALL LETTER A} is a named character */
            case 'N':
                ++s;
                if (*s == '{') {
@@ -1568,7 +1568,7 @@ S_scan_const(pTHX_ char *start)
                        d = SvPVX(sv) + SvCUR(sv);
                        has_utf8 = TRUE;
                    }
-                   if (len > e - s + 4) {
+                   if (len > e - s + 4) { /* I _guess_ 4 is \N{} --jhi */
                        char *odest = SvPVX(sv);
 
                        SvGROW(sv, (SvLEN(sv) + len - (e - s + 4)));
@@ -1653,6 +1653,10 @@ S_scan_const(pTHX_ char *start)
       Perl_croak(aTHX_ "panic: constant overflowed allocated space");
 
     SvPOK_on(sv);
+    if (PL_encoding && !has_utf8) {
+        Perl_sv_recode_to_utf8(aTHX_ sv, PL_encoding);
+        has_utf8 = TRUE;
+    }
     if (has_utf8) {
        SvUTF8_on(sv);
        if (PL_lex_inwhat == OP_TRANS && PL_sublex_info.sub_op) {
@@ -7734,3 +7738,4 @@ utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen)
     return count;
 }
 #endif
+