|
|
b8c914 |
From abd17348111a99642da217c45d836f2df5713594 Mon Sep 17 00:00:00 2001
|
|
|
b8c914 |
From: John Lightsey <lightsey@debian.org>
|
|
|
b8c914 |
Date: Tue, 31 Oct 2017 18:12:26 -0500
|
|
|
b8c914 |
Subject: [PATCH] Fix deparsing of transliterations with unprintable
|
|
|
b8c914 |
characters.
|
|
|
b8c914 |
MIME-Version: 1.0
|
|
|
b8c914 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b8c914 |
Content-Transfer-Encoding: 8bit
|
|
|
b8c914 |
|
|
|
b8c914 |
RT #132405
|
|
|
b8c914 |
|
|
|
b8c914 |
Signed-off-by: Nicolas R <atoomic@cpan.org>
|
|
|
b8c914 |
Petr Písař: Port to 5.26.1.
|
|
|
b8c914 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
b8c914 |
---
|
|
|
b8c914 |
lib/B/Deparse.pm | 2 +-
|
|
|
b8c914 |
lib/B/Deparse.t | 5 +++++
|
|
|
b8c914 |
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
b8c914 |
|
|
|
b8c914 |
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
|
|
|
b8c914 |
index 3166415..cc74552 100644
|
|
|
b8c914 |
--- a/lib/B/Deparse.pm
|
|
|
b8c914 |
+++ b/lib/B/Deparse.pm
|
|
|
b8c914 |
@@ -5200,7 +5200,7 @@ sub pchr { # ASCII
|
|
|
b8c914 |
} elsif ($n == ord "\r") {
|
|
|
b8c914 |
return '\\r';
|
|
|
b8c914 |
} elsif ($n >= ord("\cA") and $n <= ord("\cZ")) {
|
|
|
b8c914 |
- return '\\c' . unctrl{chr $n};
|
|
|
b8c914 |
+ return '\\c' . $unctrl{chr $n};
|
|
|
b8c914 |
} else {
|
|
|
b8c914 |
# return '\x' . sprintf("%02x", $n);
|
|
|
b8c914 |
return '\\' . sprintf("%03o", $n);
|
|
|
b8c914 |
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
|
|
|
b8c914 |
index 7eeb4f8..eae9c49 100644
|
|
|
b8c914 |
--- a/lib/B/Deparse.t
|
|
|
b8c914 |
+++ b/lib/B/Deparse.t
|
|
|
b8c914 |
@@ -2610,3 +2610,8 @@ sub ($a, $=) {
|
|
|
b8c914 |
$a;
|
|
|
b8c914 |
}
|
|
|
b8c914 |
;
|
|
|
b8c914 |
+####
|
|
|
b8c914 |
+# tr with unprintable characters
|
|
|
b8c914 |
+my $str;
|
|
|
b8c914 |
+$str = 'foo';
|
|
|
b8c914 |
+$str =~ tr/\cA//;
|
|
|
b8c914 |
--
|
|
|
b8c914 |
2.13.6
|
|
|
b8c914 |
|