Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding issue for some types of emails #2722

Open
3 tasks done
bderembl opened this issue Jul 3, 2024 · 8 comments
Open
3 tasks done

Encoding issue for some types of emails #2722

bderembl opened this issue Jul 3, 2024 · 8 comments
Labels

Comments

@bderembl
Copy link

bderembl commented Jul 3, 2024

Steps to reproduce:

Enter Compose mode
write an email to yourself with
Subject: tést
body: tést

send it
so far so good. I receive the email, all is fine(*).

Now, jump in Sent Folder and select the email you just sent
W (reply to all)

in this newly created reply, the subject appears as

Subject: Re: t\303\251st
image

If I try to send the email, I get the warning

Non-Printable characters found. Continue sending?

I can still send it but I receive an email with a messed up subject

Here is the raw email in the "Sent folder"


From: BD <bruno@...>
To: BD <bruno@...>
Subject: tést
Date: Wed, 03 Jul 2024 09:12:18 +0200
Message-ID: <87tth7q78t.fsf@...>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64

dMOpc3QNCg==

(*)Sidenote: I can even reply to this first email that I just received and in that case, everything is fine. The problem is only for the email that is stored in the sent folder

Environment

mu4e 1.12.5
emacs 29.3

Checklist

  • you are running either an 1.10.x/1.12.x release or master (otherwise please upgrade)
  • you can reproduce the problem without 3rd party extensions (including Doom/Evil, various extensions etc.)
  • you have read all of the above
@bderembl bderembl added bug mu4e specific for mu4e new labels Jul 3, 2024
@djcb djcb added cannotreproduce and removed new labels Jul 3, 2024
@djcb
Copy link
Owner

djcb commented Jul 3, 2024

Cannot reproduce. This is what I get:

From: "Dirk-Jan C. Binnema" <djcb@djcbsoftware.nl>
To: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
Subject: =?utf-8?Q?t=C3=A9st?=
Date: Wed, 03 Jul 2024 23:08:45 +0300
Message-ID: <87ed8az19u.fsf@djcbsoftware.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64

dMOpc3QNCg==

Seems to be some encoding issue.

Did you try with emacs -Q and only the barest minimal setup for mu4e?

@bderembl
Copy link
Author

bderembl commented Jul 4, 2024

From what I see from your email, your subject is correctly encoded:
Subject: =?utf-8?Q?t=C3=A9st?=
while mine is not
Subject: tést

Do you have any idea why?

@djcb
Copy link
Owner

djcb commented Jul 4, 2024

Yes, it's all correct here.

But, can you reproduce with a bare minimal mu4e? Use something like:

emacs -Q --eval "(progn (add-to-list 'load-path \"~/Sources/mu/build/mu4e\") (setq mu4e-mu-binary \"~/Sources/mu/build/mu/mu\") (require 'mu4e) (mu4e))"

(change the paths as necessary for your setup). Thanks.

@bderembl
Copy link
Author

bderembl commented Jul 4, 2024

yes same problem.
I need to proceed a bit differently in this case though because there is no context and mu4e is not configured to send an email.

with emacs -Q, I need to

-compose a mail with "tést" in subject, save it as a draft, select that draft, reply to all, same issue as described above.

@bderembl
Copy link
Author

bderembl commented Jul 4, 2024

but I don't understand what you mean by " it's all correct here." since our subjects differ.

@djcb
Copy link
Owner

djcb commented Jul 6, 2024

"It's all correct here" means "When I try this, the subject is correctly encoded"

We need to find out why it's not at your side. I suspect this goes a bit beyond mu4e... can you try some of the suggestions here?
https://emacs.stackexchange.com/questions/7946/using-utf8-encoding-as-default-when-writing-emails

@bderembl
Copy link
Author

bderembl commented Jul 8, 2024

Thank you for your assistance.
I have just tried all solutions proposed in your link but I get the same issue.

Could you clarify the sequence of events that happens when I save a mail as a draft?

In my case, the body of the message is correctly encoded but not the subject. Are these two elements treated separately?

@bderembl
Copy link
Author

I just tested in 1.10.8
the draft email is saved as

User-agent: mu4e 1.10.8; emacs 29.3
From: BD <bruno@...>
To: BD <bruno@...>
Subject: tést
Date: Tue, 23 Jul 2024 14:46:45 +0200

tést

so no mention of UTF-8 anywhere. If I reply to this email, there is no issue: I get

Subject: Re: tést

so no issue at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants