summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2014-03-29 15:44:03 -0500
committerCraig A. Berry <craigberry@mac.com>2014-04-10 21:42:16 -0500
commitfc6f6f37f8b700d4561f0611ef0f771349667826 (patch)
tree4e116d11b81ebd899168521d101ab551654ac6fb /utils
parent45a138846486b6dce36950400746c05ae98b93fb (diff)
downloadperl-fc6f6f37f8b700d4561f0611ef0f771349667826.tar.gz
Make perlbug encoding-agnostic in handling prepared reports.
Guessing the encoding of a report file prepared ahead of time is really, well, too much guesswork, plus there are at least a couple of mistakes in the implementation. And we weren't even trying to guess for reports created on-the-fly in an editor, which is a bit inconsistent. So handle prepared reports the same way as on-the-fly reports and attachments, which means all I/O is done using the :raw layer. This is only "Unicode-aware" in the sense that we're aware there are a lot of encodings out there and we're trying not to mangle them in transit by accidental conversion. We're not doing any explicit character set conversions and we shouldn't assert in the MIME headers that we know what character set we're sending because we don't.
Diffstat (limited to 'utils')
-rw-r--r--utils/perlbug.PL8
1 files changed, 2 insertions, 6 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index 42e8a24210..85fb134236 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -76,8 +76,6 @@ BEGIN {
$::HaveTemp = ($@ eq "");
eval { require Module::CoreList; };
$::HaveCoreList = ($@ eq "");
- eval { require encoding; };
- $::Have_get_locale_encoding = ($@ eq "" && defined &encoding::_get_locale_encoding);
};
my $Version = "1.40";
@@ -99,8 +97,6 @@ my $perl_version = $^V ? sprintf("%vd", $^V) : $];
my $config_tag2 = "$perl_version - $Config{cf_time}";
-my $input_encoding = $::Have_get_locale_encoding ? encoding::_get_locale_encoding() : '';
-
Init();
if ($opt{h}) { Help(); exit; }
@@ -616,7 +612,7 @@ EOF
if ($body) {
print REP $body;
} elsif ($usefile) {
- open(F, "<:$input_encoding", $file)
+ open(F, '<:raw', $file)
or die "Unable to read report file from '$file': $!\n";
while (<F>) {
print REP $_
@@ -1050,7 +1046,7 @@ sub _add_body_start {
my $body_start = <<"BODY_START";
This is a multi-part message in MIME format.
--$mime_boundary
-Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Type: text/plain; format=fixed
Content-Transfer-Encoding: 8bit
BODY_START