From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api] queue administration: try to decode utf8
Date: Fri, 25 Nov 2022 09:08:46 +0100 [thread overview]
Message-ID: <20221125080846.434468-1-d.csapak@proxmox.com> (raw)
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
next reply other threads:[~2022-11-25 8:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 8:08 Dominik Csapak [this message]
2022-11-28 15:16 ` [pmg-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221125080846.434468-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal