summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-02 20:35:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-02 20:35:13 +0000
commit872c91ae155f6880f8bf2b15c143bda5279a5794 (patch)
tree663505dbece632b3e75b0158fb36720c2d54829f /pp_pack.c
parentb929be1d26aeff4c8c3d4bbd655731a23247ecc8 (diff)
downloadperl-872c91ae155f6880f8bf2b15c143bda5279a5794.tar.gz
What started as a small nit (the charnames test, nit found
be Hugo), ballooned a bit... the goal is Larry's wish that illegal Unicode (such as U+FFFF) by default doesn't warn, since what if somebody WANTS to create illegal Unicode? Now getting close to this in the regex runtime. (Also, fix more of my fixation that BOM would be U+FFFE.) p4raw-id: //depot/perl@15689
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 1c5ee315ea..452a2b0a5b 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -770,7 +770,7 @@ Perl_unpack_str(pTHX_ char *pat, register char *patend, register char *s, char *
if (checksum) {
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0));
+ auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANYUV));
along = alen;
s += along;
if (checksum > bits_in_uv)
@@ -784,7 +784,7 @@ Perl_unpack_str(pTHX_ char *pat, register char *patend, register char *s, char *
EXTEND_MORTAL(len);
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0));
+ auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANYUV));
along = alen;
s += along;
sv = NEWSV(37, 0);