summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-28 15:47:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-28 15:47:43 +0000
commitffbc6a930f7d2050ba54ac6bb9f15db93c1fab59 (patch)
tree7e81ef584643250fd840d7fda63c1eb7f7a6ddb6 /utf8.c
parented4a5f9986e389ab30cb5ae84d8409ef8d4dcaec (diff)
downloadperl-ffbc6a930f7d2050ba54ac6bb9f15db93c1fab59.tar.gz
Integrate perlio:
[ 9400] More EBCDIC tweaks: - one more swash issue &~(0xA0-1) did not do the right thing, for UTF-EBCDIC where &~(0x80-1) does for UTF-8. - add "use re 'asciirange'" to make [!-~] etc. work use it in MIME::QuotedPrint and t/op/regexp.t and t/op/pat.t - Choose a key for t/op/each.t test which gets encoded. - Skip utf8decode if this is UTF-EBCDIC. p4raw-link: @9400 on //depot/perlio: daf0f78e031c718c75590ef9ef573756f805776e p4raw-id: //depot/perl@9407
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 66d3fec81c..25cd0fdc41 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1342,7 +1342,8 @@ Perl_swash_fetch(pTHX_ SV *sv, U8 *ptr)
PUSHMARK(SP);
EXTEND(SP,3);
PUSHs((SV*)sv);
- PUSHs(sv_2mortal(newSViv(code_point & ~(needents - 1))));
+ /* On EBCDIC & ~(0xA0-1) isn't a useful thing to do */
+ PUSHs(sv_2mortal(newSViv((klen) ? (code_point & ~(needents - 1)) : 0)));
PUSHs(sv_2mortal(newSViv(needents)));
PUTBACK;
if (call_method("SWASHGET", G_SCALAR))