* [pmg-devel] [PATCH pmg-api] queue administration: try to decode utf8
@ 2022-11-25 8:08 Dominik Csapak
2022-11-28 15:16 ` [pmg-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2022-11-25 8:08 UTC (permalink / raw)
To: pmg-devel
similar to how we do the rest of the mail parsing, decode with
decode_rfc1522 instead of mime_to_perl_string and use try_decode_utf8
otherwise
this is only used for the queue administration api for the user
to view
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/PMG/Postfix.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PMG/Postfix.pm b/src/PMG/Postfix.pm
index 43270c8..2708b9b 100644
--- a/src/PMG/Postfix.pm
+++ b/src/PMG/Postfix.pm
@@ -180,9 +180,9 @@ sub postcat {
my $res = '';
while (defined(my $line = <$fh>)) {
if ($decode) {
- $res .= mime_to_perl_string($line);
+ $res .= PMG::Utils::decode_rfc1522($line);
} else {
- $res .= $line;
+ $res .= PMG::Utils::try_decode_utf8($line);
}
}
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-28 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 8:08 [pmg-devel] [PATCH pmg-api] queue administration: try to decode utf8 Dominik Csapak
2022-11-28 15:16 ` [pmg-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox