2

I don't know since when and why :

$ mkdir -p a/b/c x/y/{1,2,3}
$ tree
.
├── a
│   └── b
│       └── c
└── x
    └── y
        ├── 1
        ├── 2
        └── 3

8 directories, 0 files

when I run screen, displays symbols full of question marks:

$ screen
<-- screen starts... -->
$ tree
.
��� a
�   ��� b
�       ��� c
��� x
    ��� y
        ��� 1
        ��� 2
        ��� 3

8 directories, 0 files

Similarly for utf characters.

Even if I move away my .screenrc (e.g. with mv -v ~/.screenrc{,.bak} ) it's still strange characters set.

It happens on screen on my main user, on root user, but on my secondary user it does not. On this one characters work properly in screen. And it's not .screenrc as I played with it.

Updates:

Re: $TERM - seems unrelated

  • without screen: TERM==xterm-256color
  • user A inside screen: TERM==screen.xterm-256color and display incorrectly
  • user B inside screen: TERM==screen.xterm-256color and display correctly

Re: defutf8 on - does something

After adding defutf8 on in .screenrc there is now mix ;p some symbols work some don't, example :

$ tree
.
├── a
│�� └── b
│��     └── c
└── x
    └── y
        ├── 1
        ├── 2
        └── 3

8 directories, 0 files
4
  • 1
    When I do the same on Ubuntu 20.10 I do not see any difference between outputs. screen does not change anything to the appearance of Terminal although it is in the ps list. Screen version 4.08.00 (GNU) 05-Feb-20 Commented Apr 21, 2021 at 22:35
  • 1
    Check the values of $TERM in both environments. Try using the $TERM value from your working environment.
    – waltinator
    Commented Apr 21, 2021 at 23:07
  • 1
    Do you have defutf8 on in your ~/.screenrc? or run screen with -U? BTW, it has been a long time since I used screen, but I vaguely remember that disappointment with its utf handling was one of the reasons i switched to tmux.
    – cas
    Commented Apr 22, 2021 at 5:21
  • I have this issue but do not have LC_PAPER set, running screen under iTerm2 on OSX. iTerm2 displays the utf8 properly, but screen will only display a subset properly.
    – technomage
    Commented Jun 25 at 15:07

1 Answer 1

0

Thanks to comments in my original question, they helped me to narrow troubleshooting and find that this one line in my ~/.bashrc is the cause - locale staff I guess:

export LC_PAPER=a4

with this line, e.g. tree displays correctly without screen but incorrectly inside screen.

After removing this line from .bashrc it looks good again.

3
  • Still - anyone with idea how to make it work despite LC_PAPER=a4 ? :P Commented Apr 22, 2021 at 8:02
  • 1
    Your paper size can be found in /etc/papersize - this would normally contain 'a4'. There is also a file /usr/lib/locale/C.UTF-8/LC_PAPER which contains unprintable data. Neither file should be referenced in ~/.bashrc Commented May 3, 2021 at 14:38
  • 2
    use screen -U solved a similar display problem in screen terminal. Commented Feb 28 at 1:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .