diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-05 20:13:34 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-05 20:13:34 +0000 |
commit | a9917092f55cf6287a909590dc9356b9393a59e0 (patch) | |
tree | 482c9ae717516b1e52157f0c6b7a554e87a796c0 /utf8.c | |
parent | 9dc04555a4dee089737beb20cff84a725f3a5696 (diff) | |
download | perl-a9917092f55cf6287a909590dc9356b9393a59e0.tar.gz |
Split off the UTF-8 decoder tests, make them to check also
the error message.
p4raw-id: //depot/perl@7996
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -309,13 +309,6 @@ Perl_utf8_to_uv(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, U32 flags) "Malformed UTF-8 character (byte order mark 0x%04"UVxf")", uv); goto malformed; - } else if ((uv == 0xffff) && - !(flags & UTF8_ALLOW_FFFF)) { - if (dowarn) - Perl_warner(aTHX_ WARN_UTF8, - "Malformed UTF-8 character (character 0x%04"UVxf")", - uv); - goto malformed; } else if ((expectlen > UNISKIP(uv)) && !(flags & UTF8_ALLOW_LONG)) { if (dowarn) @@ -323,6 +316,13 @@ Perl_utf8_to_uv(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, U32 flags) "Malformed UTF-8 character (%d byte%s, need %d)", expectlen, expectlen == 1 ? "": "s", UNISKIP(uv)); goto malformed; + } else if ((uv == 0xffff) && + !(flags & UTF8_ALLOW_FFFF)) { + if (dowarn) + Perl_warner(aTHX_ WARN_UTF8, + "Malformed UTF-8 character (character 0x%04"UVxf")", + uv); + goto malformed; } return uv; |