diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2000-11-10 01:47:15 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-13 04:05:07 +0000 |
commit | a1ca4561f20dbf547f57d39a690790cbe33210da (patch) | |
tree | 83f9af82cb7a2699ca5ca248e9907ac52b3924a8 /doop.c | |
parent | d26ab924bbea5dd5379307deb59c11af3692350b (diff) | |
download | perl-a1ca4561f20dbf547f57d39a690790cbe33210da.tar.gz |
Tweak the definition of the bit complement on UTF-8 data:
if none of the characters in the string are > 0xff,
the result is a complemented byte string, not a (UTF-8)
char string. Based on the summary in
Subject: Re: [ID 20000918.005] ~ on wide chars
Message-ID: <jSDD6gzkgi/T092yn@efn.org>
This should give us the maximum backward (pre-char string)
compatibility and utf8 compatibility. The other alternative
would be to limit the bit complement to be always byte only,
taking the least significant byte of the chars.
p4raw-id: //depot/perl@7665
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -926,7 +926,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) if (left_utf && !right_utf) sv_utf8_upgrade(right); - if (!left_utf && right_utf) + else if (!left_utf && right_utf) sv_utf8_upgrade(left); if (sv != left || (optype != OP_BIT_AND && !SvOK(sv) && !SvGMAGICAL(sv))) |