Subject: Re: bug#44664: 28.0.50; troubles with some chars in term

From: Jean Louis <[email-masked]>
Date: Thu, 19 Nov 2020 19:38:04 +0300

* Eli Zaretskii <[email-masked]> [2020-11-19 19:16]:
> > #<font-object "-GNU #-FreeMono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1"
> 
> And this is different from the font used for, say, ASCII characters?

No, same font is appearing everywhere.

> > Otherwise you may see 2 attached screenshots. First screenshot will
> > show condition "before" as that is when I yet did not come to
> > allegedly offending characters. There is one line for message of
> > Thien-Thi
> > 
> > What one DOES NOT SEE is that there is actually another invisible
> > line, now shown there. I can see it in mutt in xterm, you can find it
> > under "Web spy" and before "Thien-Thi". That line is not shown in mutt
> > under M-x term, until I come with the mutt highlighted line to it.
> > 
> > The line is from 2002-03-09 - as I said it cannot be seen.
> 
> That mbox file has several email messages where the encoding is either
> wrongly declared or is not recognized by mutt.  That's a different
> problem, unrelated to term.el and its handling of fonts.

I do understand to a degree. I am pointing to the fact that mutt
handles those characters and in external terminal emulators it looks
just fine. 

> > Then that line shows itself and I can see some replaced characters and
> > I can see this character not replaced with that circled ?. It is just
> > perception that this character and maybe others are not properly
> > interpreted by the terminal or fonts.
> > 
> >              position: 2833 of 7081 (40%), column: 52
> >             character:  (displayed as ) (codepoint 60531, #o166163, #xec73)
> >               charset: unicode (Unicode (ISO10646))
> > code point in charset: 0xEC73
> >                syntax: w 	which means: word
> >              category: L:Left-to-right (strong)
> >              to input: type "C-x 8 RET ec73"
> >           buffer code: #xEE #xB1 #xB3
> >             file code: #xEE #xB1 #xB3 (encoded by coding system utf-8-unix)
> >               display: no font available
> > 
> > Character code properties: customize what to show
> >   general-category: Co (Other, Private Use)
> >   decomposition: (60531) ('')
> 
> This is a PUA character, another separate issue (Emacs doesn't expect
> to see such characters in human-readable text, and cannot display them
> without special tinkering with font setup).

OK, I wish I could help more.

> Finally, I don't know what byte sequences did mutt send to the
> terminal, it is possible that some problems you see are because
> term.el is unable to interpret some sequences that mutt assumes to be
> supported.  (What termcap/terminfo entry did you use in that shell,
> which tells mutt what commands to send?)

I think those are set by M-x terminal

$ echo $TERM
eterm-color
~
$ echo $TERMINFO 
/package/text/emacs/share/emacs/28.0.50/etc/
~
$ echo $TERMCAP 
eterm-color:li#28:co#97:cl=\E[H\E[J:cd=\E[J:bs:am:xn:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:ce=\E[K:ho=\E[H:pt:al=\E[L:dl=\E[M:DL=\E[%dM:AL=\E[%dL:cs=\E[%i%d;%dr:sf=^J:dc=\E[P:DC=\E[%dP:IC=\E[%d@:im=\E[4h:ei=\E[4l:mi::so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:md=\E[1m:mr=\E[7m:me=\E[m:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:kl=\EOD:kd=\EOB:kr=\EOC:ku=\EOA:kN=\E[6~:kP=\E[5~:@7=\E[4~:kh=\E[1~:mk=\E[8m:cb=\E[1K:op=\E[39;49m:Co#8:pa#64:AB=\E[4%dm:AF=\E[3%dm:cr=^M:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E[24m:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:r1=\Ec:

> Bottom line, I'm no longer sure which problems we are discussing here,
> since we have several unrelated issues involved.  Please consider
> separating the issues.

I wish that lines are correctly displayed on terminal emulator screen,
that is the sole subject.

But now I have idea, let me answer in few minutes.