From 82c16ff41e7bc03347c2d9c685e5af8f585f9f61 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 7 Jul 2012 19:58:28 -0700 Subject: [PATCH] Only use decode_utf8 if the string isn't already in perl's internal encoding --- Debbugs/MIME.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Debbugs/MIME.pm b/Debbugs/MIME.pm index c2faeaa..e94733e 100644 --- a/Debbugs/MIME.pm +++ b/Debbugs/MIME.pm @@ -313,7 +313,7 @@ sub encode_rfc1522 { if (length $encoded > 75) { # Turn utf8 into the internal perl representation # so . is a character, not a byte. - my $tempstr = decode_utf8($word,Encode::FB_DEFAULT); + my $tempstr = is_utf8($word)?$word:decode_utf8($word,Encode::FB_DEFAULT); my @encoded; # Strip it into 10 character long segments, and encode # the segments -- 2.39.2