On Thu, 28 May 2026, Eduardo Chappa via Alpine-info wrote:
> The problem has to do with character width. Alpine has no idea of the correct
> width of the characters it is printing. It is assuming a width (say 1) when in
> reality it is different (say 2, in this example).

Yes, indeed. And when I said "all is well when GNU/screen is used" this 
was incorrect, as the width of the subject lines is clearly off: 

  https://postimg.cc/G9qmdXCS

But it's not entirely garbled and I can scroll at least through the 
messages w/o the screen getting messed up with every curser move.

> There are some areas of unicode where the width is ambiguous and the c-client
> library, the same library that uses UTF-8 for email, where width is not a
> concern, is agnostic of terminals. The problem you are pointing out was
> pointed out in the past, and Mark Crisping refused to address it because
> (paraphrasing his words) "it would be too slow to print a character into the
> screen, determine its actual width, and then continue printing". I think
> someone from Suse posted a code that could do that at the time, and I have
> tried to find it, but I can't seem to locate it.

Interesting stuff, thank you for explaining! Sadly we cannot ask Mark for 
help anymore :-(

> You should see this problem when you receive messages with emojis in the
> subject. Sometimes they get misaligned for this reason. Not all of them, but
> if it happens, that is the reason why.

Yes, indeed. Emojis in subject lines have the same effect.

> In any case, the issue is width. I know the problem can be addressed
> programatically in a better way, and it seems not to have caused many
> problems.

That sounds hopeful! :-)

> There is a feature in Alpine that might help. Try to see if enabling
>  [X]  Use System Translation

I tried this, in GNU/screen again, with TERM=screen-256color, saved the 
config change, restarted Alpine even, but with no change:

 https://postimg.cc/XBnZxcZJ

> helps a bit. If I find the code to read width from the terminal, I might add
> it to Alpine to make this process better.

That'd be nice of course. But...I'm a bit puzzled that this issue is not 
affecting more people. With such a large, or at least diverse user base, 
there should be people out there that regularly receive mails with unicode 
subject lines, no? I was hoping that someone snapp^W replied to my inquiry 
with "Hey, this has been reported multiple times, search the archives man, 
and here's a magic TERM variable for you", but reading your answer 
suggests that this is indeed an unresolved issue.

Well, thank you for your response, and thanks for looking into this, if 
you really find the time.

Christian.
-- 
BOFH excuse #113:

Root nameservers are out of sync
_______________________________________________
Alpine-info mailing list
[email protected]
http://mailman23.u.washington.edu/mailman/listinfo/alpine-info

Reply via email to