if (is(scalar @warnings, 1,
"$this_name: Got a single warning "))
{
- TODO: {
- local $TODO = "Doesn't give dire warning for code points 2**31" if $allowed_uv >= 2**31 && $warnings[0] =~ /may not be portable/;
unless (like($warnings[0], $message,
"$this_name: Got expected warning"))
{
diag $call;
}
- }
}
else {
diag $call;
if (is(scalar @warnings, 1,
"$this_name: Got a single warning "))
{
- TODO: {
- local $TODO = "Doesn't give dire warning for code points 2**31" if $allowed_uv >= 2**31 && $warnings[0] =~ /may not be portable/;
unless (like($warnings[0], $message,
"$this_name: Got expected warning"))
{
diag $call;
}
- }
}
else {
diag $call;
}
}
else if (UNICODE_IS_SUPER(uv)) {
- if (flags & UNICODE_WARN_SUPER
+ if ( (flags & UNICODE_WARN_SUPER)
|| (UNICODE_IS_FE_FF(uv) && (flags & UNICODE_WARN_FE_FF)))
- {
- Perl_ck_warner_d(aTHX_ packWARN(WARN_NON_UNICODE),
- "Code point 0x%04"UVXf" is not Unicode, may not be portable", uv);
+ {
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_NON_UNICODE),
+
+ /* Choose the more dire applicable warning */
+ (UNICODE_IS_FE_FF(uv))
+ ? "Code point 0x%"UVXf" is not Unicode, and not portable"
+ : "Code point 0x%"UVXf" is not Unicode, may not be portable",
+ uv);
}
if (flags & UNICODE_DISALLOW_SUPER
|| (UNICODE_IS_FE_FF(uv) && (flags & UNICODE_DISALLOW_FE_FF)))
if ((flags & (UTF8_WARN_SUPER|UTF8_CHECK_ONLY)) == UTF8_WARN_SUPER
&& ckWARN_d(WARN_NON_UNICODE))
{
- sv = sv_2mortal(Perl_newSVpvf(aTHX_ "Code point 0x%04"UVXf" is not Unicode, may not be portable", uv));
+ sv = sv_2mortal(Perl_newSVpvf(aTHX_
+ "Code point 0x%04"UVXf" is not Unicode, may not be portable",
+ uv));
pack_warn = packWARN(WARN_NON_UNICODE);
}
#ifndef EBCDIC /* Can never have the equivalent of FE nor FF on EBCDIC, since
* before possibly bailing out, so that the more dire warning
* overrides the regular one, if applicable */
if ((*s0 & 0xFE) == 0xFE /* matches both FE, FF */
- && (flags & (UTF8_WARN_FE_FF|UTF8_DISALLOW_FE_FF)))
+ && (flags & (UTF8_WARN_FE_FF|UTF8_WARN_SUPER|UTF8_DISALLOW_FE_FF)))
{
- if ((flags & (UTF8_WARN_FE_FF|UTF8_CHECK_ONLY))
- == UTF8_WARN_FE_FF
- && ckWARN_d(WARN_UTF8))
+ if ( ! (flags & UTF8_CHECK_ONLY)
+ && (flags & (UTF8_WARN_FE_FF|UTF8_WARN_SUPER))
+ && ckWARN_d(WARN_UTF8))
{
- sv = sv_2mortal(Perl_newSVpvf(aTHX_ "Code point 0x%"UVXf" is not Unicode, and not portable", uv));
+ sv = sv_2mortal(Perl_newSVpvf(aTHX_
+ "Code point 0x%"UVXf" is not Unicode, and not portable",
+ uv));
pack_warn = packWARN(WARN_UTF8);
}
if (flags & UTF8_DISALLOW_FE_FF) {