On 2026-08-21 21:44:08 +0800, Kevin J. McCarthy wrote: > On Fri, Aug 21, 2026 at 03:12:01PM +0200, Vincent Lefevre wrote: > > On 2026-08-21 11:00:58 -0000, Crystal Kolipe via Mutt-dev wrote: > > > On Fri, Aug 21, 2026 at 10:09:27AM +0200, Vincent Lefevre wrote: > > > > (actually, we want to know whether the file contents have changed). > > > > > > Then the correct and portable way to do it is to check file size, > > > and if that has not changed then check the actual contents. > > > > True. This is what *must* be done. Comparing the contents should be > > based on a cryptographic hash because the old contents are no longer > > available. > > > > The current Mutt behavior is buggy (on any platform): replacing > > an attachment (e.g. with "mv") by an one that isn't more recent > > is undetected by Mutt, while the goal of the test is to detect > > a replacement to ensure that the encoding is correct. > > I'm not strongly opposed to doing a hash. But I think the original intent > was to protect the user against accidental trip-ups, not to provide a > fool-proof measure. The user can just as easily override encoding and types > if they want to send something incorrect.
I'm wondering which one, then. Currently, with the following: 1. printf "\xe9" > foo 2. Compose a mail with Mutt and attach file "foo" (it is recognized as iso-8859-1, which is "é"). 3. recode l1..utf8 foo 4. Send the message. Mutt doesn't give any warning, and one gets "é" (with the same encoding iso-8859-1). -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
