diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-03-05 10:34:05 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-03-05 10:42:06 -0700 |
commit | ac75b4855a68341286ec0a33dea1d0908bd367fe (patch) | |
tree | cdc9b30758fe510c8b3ecabce9b222e98b3f9e5e | |
parent | c24a8ba364a751cb1cd5d4f9135fa3d621a5dbdd (diff) | |
download | perl-smoke-me/khw-regex.tar.gz |
PATCH: [perl #111338] Warnings in utf8 subcategories do nothing in isolationsmoke-me/khw-regex
This was the result of assuming that these would not be on unless
the main category was also on.
-rw-r--r-- | doio.c | 2 | ||||
-rw-r--r-- | t/lib/warnings/utf8 | 3 | ||||
-rw-r--r-- | utf8.c | 2 |
3 files changed, 2 insertions, 5 deletions
@@ -1225,7 +1225,7 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp) tmpbuf = bytes_to_utf8((const U8*) tmps, &len); tmps = (char *) tmpbuf; } - else if (ckWARN_d(WARN_UTF8)) { + else if (ckWARN4_d(WARN_UTF8, WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) { (void) check_utf8_print((const U8*) tmps, len); } } diff --git a/t/lib/warnings/utf8 b/t/lib/warnings/utf8 index 7d3886c388..44e3c4e4fa 100644 --- a/t/lib/warnings/utf8 +++ b/t/lib/warnings/utf8 @@ -349,7 +349,6 @@ EXPECT Unicode surrogate U+D800 is illegal in UTF-8 at - line 6. Unicode non-character U+FFFF is illegal for open interchange at - line 7. ######## -# TODO # NAME C<use warnings "nonchar"> works in isolation require "../test.pl"; use warnings 'nonchar'; @@ -360,7 +359,6 @@ close $fh; EXPECT Unicode non-character U+FFFF is illegal for open interchange at - line 5. ######## -# TODO # NAME C<use warnings "surrogate"> works in isolation require "../test.pl"; use warnings 'surrogate'; @@ -371,7 +369,6 @@ close $fh; EXPECT Unicode surrogate U+D800 is illegal in UTF-8 at - line 5. ######## -# TODO # NAME C<use warnings "non_unicode"> works in isolation require "../test.pl"; use warnings 'non_unicode'; @@ -136,7 +136,7 @@ Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) { PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS; - if (ckWARN_d(WARN_UTF8)) { + if (ckWARN4_d(WARN_UTF8, WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) { if (UNICODE_IS_SURROGATE(uv)) { if (flags & UNICODE_WARN_SURROGATE) { Perl_ck_warner_d(aTHX_ packWARN(WARN_SURROGATE), |