Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-03 Thread Kevin J. McCarthy
On Wed, Aug 03, 2022 at 02:37:00PM +0900, Kenichi Asai wrote: Yes, and it solved the problem!!! Thank you very much! I haven't compiled mutt by myself for long, so I rewrote the homebrew formula to use the patch and let homebrew recompile (mutt 2.2.3). Thank you Kenichi and Dennis for

Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-02 Thread Dennis Preiser
On Tue, Aug 02, 2022 at 08:55:53PM -0700, Kevin J. McCarthy wrote: > - while (ISSPACE (*buf)) > + while (is_email_wsp (*buf)) I was also able to reproduce the issue (on macOS) and can also confirm that with this patch, the issue no longer occurs. Dennis

Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-02 Thread Kenichi Asai
> Darn, that was my best guess. After I sent the email, I even found some old > bug reports that 0xa0 was considered "space" on MacOS (e.g. > https://bugs.python.org/issue7072) > > Still, perhaps there is something different about the way Mutt was built > versus the quick compile. > > Have you

Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-02 Thread Kevin J. McCarthy
On Wed, Aug 03, 2022 at 12:21:09PM +0900, Kenichi Asai wrote: asai@bigsur % cat test.c #include #include int main () { printf("%d\n", isspace(0xa0)); printf("%d\n", isspace(0x85)); printf("%d\n", isspace(0x0a)); return 0; } [...] asai@bigsur % ./test 0 0 1 asai@bigsur % Darn, that

Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-02 Thread Kenichi Asai
> Would you mind creating a script to use for $editor. Something like: > > - - - - myeditor.sh - - - - > #!/bin/bash > > cp $1 ~/before.txt > vim $1 > cp $1 ~/after.txt > - - - - end myeditor.sh - - - > > set editor = "~/myeditor.sh" > > Then, if you put 加 at the end of the subject

Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-02 Thread Kenichi Asai
> > I try to send this e-mail out in 7bit mode (with υ at the end of > > Subject). > > Why would you do that when the discussion seems to be about UTF-8 > glyphs ? I'm curious. I just thought that quoted printable did some work on the Subject line, but I was wrong. -- Kenichi Asai

Re: Subject that ends with UTF-8, 85 or A0 e.g.:

2022-08-02 Thread Kevin J. McCarthy
On Wed, Aug 03, 2022 at 09:53:42AM +0900, Kenichi Asai wrote: * In the step: "- enter some e-mail address and a subject." if instead, you put a 加 at the end of the subject here, before running vim, does 加 show up in vim? Yes. If you then don't modify the subject while still in vim, does it

Re: Subject that ends with UTF-8, 85 or A0 : �

2022-08-02 Thread Kenichi Asai
> > This e-mail has υ at the end of Subject. I will send it out. > > Somehow, the previous e-mail did not contain the replacement character > at the end of Subject. I don't know why. Because the e-mail was > quoted perhaps? > > [text/plain, quoted, utf-8, 1.3K] > > Bastian's e-mail is 7bit

Re: Subject that ends with UTF-8, 85 or A0 e.g.: �

2022-08-02 Thread Kenichi Asai
> This e-mail has υ at the end of Subject. I will send it out. Somehow, the previous e-mail did not contain the replacement character at the end of Subject. I don't know why. Because the e-mail was quoted perhaps? [text/plain, quoted, utf-8, 1.3K] Bastian's e-mail is 7bit (as is my original

Re: Subject that ends with UTF-8, 85 or A0 e.g.: �

2022-08-02 Thread Kenichi Asai
Thank you all for considering this issue. > * After you finish the above steps, what happens if you edit the email again > in vim? Does the 加 show up at the end of the subject in vim the second time? No. In vim, the character becomes ?? (two question marks). > * With your original steps, what

Re: Subject that ends with UTF-8, 85 or A0 e.g.: υ

2022-08-02 Thread Paul Gilmartin via Mutt-users
On 8/2/22 13:58:37, Kevin J. McCarthy wrote: On Tue, Aug 02, 2022 at 03:52:51PM +0900, Kenichi Asai wrote: When the subject ends with a character whose last byte in UTF-8 is either 85 or A0, it appears the character collapses. > I'm having trouble duplicating this problem on Debian Testing.  So

Re: Subject that ends with UTF-8, 85 or A0

2022-08-02 Thread Kevin J. McCarthy
On Tue, Aug 02, 2022 at 03:52:51PM +0900, Kenichi Asai wrote: When the subject ends with a character whose last byte in UTF-8 is either 85 or A0, it appears the character collapses. To reproduce: - prepare .mutt/muttrc containing only the following line: set edit_headers=yes - launch mutt and

Re: Subject that ends with UTF-8, 85 or A0 �

2022-08-02 Thread Dennis Preiser
On Tue, Aug 02, 2022 at 11:17:14PM +0700, Đoàn Trần Công Danh wrote: > On 2022-08-02 13:07:42+0200, Dennis Preiser wrote: >> On Tue, Aug 02, 2022 at 12:39:06PM +0200, Bastian wrote: >> > Maybe some local vim/encoding issues on darwin? >> >> Maybe. Interestingly, if I change the subject via 's'

Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Đoàn Trần Công Danh
On 2022-08-02 13:07:42+0200, Dennis Preiser wrote: > On Tue, Aug 02, 2022 at 12:39:06PM +0200, Bastian wrote: > > I see it in the subject now. > > There are two U+FFFD chars. > > > >> | System: Darwin 21.6.0 (arm64) > >> | ncurses: ncurses 6.3.20220625 (compiled with 6.3) > >> | libiconv: 1.16 >

Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Dennis Preiser
On Tue, Aug 02, 2022 at 12:39:06PM +0200, Bastian wrote: > I see it in the subject now. > There are two U+FFFD chars. > >> | System: Darwin 21.6.0 (arm64) >> | ncurses: ncurses 6.3.20220625 (compiled with 6.3) >> | libiconv: 1.16 >> | hcache backend: lmdb LMDB 0.9.70: (December 19, 2015) >> | >>

Re: Subject that ends with UTF-8, 85 or A0 ��

2022-08-02 Thread Bastian
> > I can't reproduce either. > > I can reproduce the issue. In vim the character 0x52a0 is still present: > > > > After quitting vim, mutt displays the unicode replacement character > 0xfffd instead of 0x52a0: I see it in the subject now. There are two

Re: Subject that ends with UTF-8, 85 or A0 �

2022-08-02 Thread Dennis Preiser
On Tue, Aug 02, 2022 at 04:04:07PM +0700, Đoàn Trần Công Danh wrote: > On 2022-08-02 10:06:08+0200, Bastian wrote: >> On 02Aug22 15:52+0900, Kenichi Asai wrote: >> > Would it be possible to somehow avoid this problem? I cannot avoid >> > creating e-mails with Japanese characters in Subject and

Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Bastian
On 02Aug22 16:04+0700, Đoàn Trần Công Danh wrote: > On 2022-08-02 10:06:08+0200, Bastian wrote: > > υ 0x3C5 > > % 0xFF05 > > e 0xFF45 > > ム 0x30E0 > > 加 0x52A0 > > > > So only the last matches your description 'last byte is A0' > > I think he meant the last byte of their utf-8 representation: >

Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Đoàn Trần Công Danh
On 2022-08-02 10:06:08+0200, Bastian wrote: > On 02Aug22 15:52+0900, Kenichi Asai wrote: > > - prepare .mutt/muttrc containing only the following line: > > set edit_headers=yes > > - launch mutt and type m to create a new mail. > > - enter some e-mail address and a subject. > > - vim launches.

Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Bastian
On 02Aug22 15:52+0900, Kenichi Asai wrote: > - prepare .mutt/muttrc containing only the following line: > set edit_headers=yes > - launch mutt and type m to create a new mail. > - enter some e-mail address and a subject. > - vim launches. > - edit Subject line so that it ends with a character

Subject that ends with UTF-8, 85 or A0

2022-08-02 Thread Kenichi Asai
When the subject ends with a character whose last byte in UTF-8 is either 85 or A0, it appears the character collapses. To reproduce: - prepare .mutt/muttrc containing only the following line: set edit_headers=yes - launch mutt and type m to create a new mail. - enter some e-mail address and a