all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: James Brown <randomvoidmail@foxmail.com>,
	pve-devel <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH] Patch for UTF8 encoding in Tools.pm
Date: Wed, 9 Oct 2024 08:10:13 +0200	[thread overview]
Message-ID: <e5e78a6a-c4fe-4f45-859a-69ca0666ef56@proxmox.com> (raw)
In-Reply-To: <tencent_A1C4A34146193A960D99A3486B70D4B0370A@qq.com>

Am 09/10/2024 um 02:45 schrieb James Brown:
> From 8ed0c20251c464a058ea08872bc7d54f6701d912 Mon Sep 17 00:00:00 2001
> From: James Brown <randomvoidmail@foxmail.com&gt;
> Date: Wed, 9 Oct 2024 08:40:10 +0800
> Subject: [PATCH] Add UTF8 encoding
> 

Please provide some actual commit message for why this is done, and evaluating
the actual fall out of the change.

> ---
> &nbsp;src/PVE/Tools.pm | 4 ++++
> &nbsp;1 file changed, 4 insertions(+)
> 
> 
> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
> index bd305bd..cf86a0e 100644
> --- a/src/PVE/Tools.pm
> +++ b/src/PVE/Tools.pm
> @@ -3,6 +3,10 @@ package PVE::Tools;
> &nbsp;use strict;
> &nbsp;use warnings;

the patch is broken, please submit it with a mail user agent that does not
messes with whitespace, if in doubt use git send-email [0].

[0]: https://git-send-email.io/
 
> +use open qw(:std :utf8);

that can have lots of fallout, or did you check all sites using PVE::Tools and
opening files to ensure that all definitively will write valid UTF-8 only?

> +use Encode qw(decode_utf8);
> +@ARGV = map { decode_utf8($_, 1) } @ARGV;

why are you re-encoding the system argument list in some library module?!
That is really a no-go, this must stay in the control of the actual executable.

> +
> &nbsp;use Date::Format qw(time2str);
> &nbsp;use Digest::MD5;
> &nbsp;use Digest::SHA;
> --
> 2.34.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


       reply	other threads:[~2024-10-09  6:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_A1C4A34146193A960D99A3486B70D4B0370A@qq.com>
2024-10-09  6:10 ` Thomas Lamprecht [this message]
2024-10-13 10:26 James Brown via pve-devel
  -- strict thread matches above, loose matches on Subject: below --
2024-10-09  0:45 James Brown via pve-devel

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=e5e78a6a-c4fe-4f45-859a-69ca0666ef56@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=randomvoidmail@foxmail.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