Changes to perlfaq8 "How do I find out if I'm running interactively
[p5sagit/p5-mst-13.2.git] / utf8.c
diff --git a/utf8.c b/utf8.c
index 1e39edc..29cae31 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -283,9 +283,10 @@ Perl_is_utf8_string(pTHX_ const U8 *s, STRLEN len)
             c = UTF8SKIP(x);
             if (IS_UTF8_CHAR_FAST(c)) {
                 if (!IS_UTF8_CHAR(x, c))
-                    goto out;
-            } else if (!is_utf8_char_slow(x, c))
-                goto out;
+                    c = 0;
+            }
+            else
+               c = is_utf8_char_slow(x, c);
 #else
             c = is_utf8_char(x);
 #endif /* #ifdef IS_UTF8_CHAR */
@@ -1609,7 +1610,7 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits
        const char* const pv = SvPV_const(tokenbufsv, len);
 
        Copy(pv, PL_tokenbuf, len+1, char);
-       PL_curcop->op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);
+       CopHINTS_set(PL_curcop, PL_hints);
     }
     if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
         if (SvPOK(retval))
@@ -1710,7 +1711,7 @@ Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8)
                                needents);
 
            if (IN_PERL_COMPILETIME)
-               PL_curcop->op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);
+               CopHINTS_set(PL_curcop, PL_hints);
 
            svp = hv_store(hv, (const char *)ptr, klen, swatch, 0);