From c634fdd3b2501ff011e0c62781a677a61c9194c1 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 27 Sep 2011 19:20:19 -0600 Subject: [PATCH] Revise diagnostic text I believe that the new wording is clearer than the older, which I wrote. --- pod/perldelta.pod | 6 +++++- pod/perldiag.pod | 2 +- t/lib/warnings/utf8 | 4 ++-- utf8.c | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a9ae7ee..4afdba4 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -196,7 +196,11 @@ XXX Changes (i.e. rewording) of diagnostic messages go here =item * -XXX Describe change here +The message, +"Code point 0x%X is not Unicode, no properties match it; all inverse +prop erties do" has been changed to "Code point 0x%X is not Unicode, all +\p{} matches fail; all \P{} matches succeed" + =back diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 9ef46e4..7e0cdd9 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1367,7 +1367,7 @@ template code following the slash. See L. =item Code point 0x%X is not Unicode, may not be portable -=item Code point 0x%X is not Unicode, no properties match it; all inverse properties do +=item Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed (W utf8, non_unicode) You had a code point above the Unicode maximum of U+10FFFF. diff --git a/t/lib/warnings/utf8 b/t/lib/warnings/utf8 index 7ed458d..0514ee7 100644 --- a/t/lib/warnings/utf8 +++ b/t/lib/warnings/utf8 @@ -186,14 +186,14 @@ chr(0x10FFFE) =~ /\p{Any}/; chr(0x10FFFF) =~ /\p{Any}/; chr(0x110000) =~ /\p{Any}/; EXPECT -Code point 0x110000 is not Unicode, no properties match it; all inverse properties do at - line 14. +Code point 0x110000 is not Unicode, all \p{} matches fail; all \P{} matches succeed at - line 14. ######## use warnings 'utf8'; chr(0x110000) =~ /\p{Any}/; no warnings 'non_unicode'; chr(0x110000) =~ /\p{Any}/; EXPECT -Code point 0x110000 is not Unicode, no properties match it; all inverse properties do at - line 2. +Code point 0x110000 is not Unicode, all \p{} matches fail; all \P{} matches succeed at - line 2. ######## require "../test.pl"; use warnings 'utf8'; diff --git a/utf8.c b/utf8.c index 7763e82..724f184 100644 --- a/utf8.c +++ b/utf8.c @@ -2169,7 +2169,7 @@ Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8) SV** const bitssvp = hv_fetchs(hv, "BITS", FALSE); if (SvUV(*bitssvp) == 1) { Perl_warner(aTHX_ packWARN(WARN_NON_UNICODE), - "Code point 0x%04"UVXf" is not Unicode, no properties match it; all inverse properties do", code_point); + "Code point 0x%04"UVXf" is not Unicode, all \\p{} matches fail; all \\P{} matches succeed", code_point); } } } -- 2.7.4