From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: [pve-devel] applied: [PATCH storage] Plugins: en/decode notes as UTF-8
Date: Tue, 26 Apr 2022 15:36:45 +0200 [thread overview]
Message-ID: <81c8f625-d6d9-4389-2605-0ae940aa817f@proxmox.com> (raw)
In-Reply-To: <20220309082128.760917-1-d.csapak@proxmox.com>
On 09.03.22 09:21, Dominik Csapak wrote:
> When writing into the file, explicitly utf8 encode it, and then try to
> utf8 decode it on read.
>
> If the notes are not valid utf8, we assume it was an iso-8859 comment
> and return is at is was.
>
> Technically this is a breaking change, since there are iso-8859 comments
> that would sucessfully decode as utf8, for example:
> the byte sequence "C2 A9" would be "£" in iso, but would decode to "£".
>
> From what i can tell though, this is rather unlikely to happen for
> "real world" notes, because the first byte would be in the range of
> C0-F7 (which are mostly language dependent characters like "Â")
> and the following bytes would have to be in the range of
> 80-BF, which are only special characters like "£" (or undefined)
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> PVE/Storage/DirPlugin.pm | 9 +++++++--
> PVE/Storage/Plugin.pm | 3 ++-
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
>
applied, with commit message typos (there where at least one other) fixed, thanks!
prev parent reply other threads:[~2022-04-26 13:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 8:21 [pve-devel] " Dominik Csapak
2022-03-09 9:51 ` Dominik Csapak
2022-04-25 14:27 ` Dominik Csapak
2022-04-26 13:36 ` Thomas Lamprecht [this message]
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=81c8f625-d6d9-4389-2605-0ae940aa817f@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox