Hi Pyroscope
I've managed to get the latest rtorrent-PS compiled on Solaris 11.4, using GCC 7.3.0. Mostly it works fine, but there's one big problem: terminal display is incorrect, with columns not aligning correctly and some characters duplicated. This is best shown in a screenshot:
https://i.imgur.com/eTsnJub.png . The "started" view is even worse:
https://i.imgur.com/KrkBOGT.png
In non-condensed mode things are nearly normal, although one row still hangs onto the next line by one } char, and the "active row" indicator jams on that row:
https://i.imgur.com/rLq57w6.png
I do not see any issues in vanilla rtorrent, either 0.9.6 or 0.9.7.
My default TERM is xterm-256color. For locale I have tried en_US.UTF-8 and en_GB.UTF-8 (my normal choice). I have pyrocore installed, and have tested with your
~/rtorrent/start script, ensuring LANG is definitely set correctly. LC_* are unset. I have also tested in tmux -2u with TERM=screen-256color and TERM=tmux-256color, which again made no difference. I have also tested various other TERM values, both in and out of tmux, and again the problem remains in all. I even tried screen.
I thought it could be a NCurses/NCursesW issue. Solaris 11.4 includes NCurses 6.0, compiled as the version 5 ABI. I did my own separate compile of the latest NCurses 6.1.0 with ABI=6 and integrated it into the rtorrent-PS build, but this made no difference. I have confirmed that I am using the normal GNU terminfo database, and tried setting the latest terminfo database location on the commandline, eg: TERMINFO=~/.local/ncurses-6.1/usr/share/terminfo rtorrent/start
I've run the terminal tests mentioned in the docs, which work fine. The PYTHONIOENCODING=utf-8 python -c ... command prints:
⋅ ⋅⋅ ” ’ ♯ ☢ ☍ ⌘ ✰ ⣿ ⚡ ☯ ⚑ ↺ ⤴ ⤵ ∆ ⌚ ≀∇ ✇ ⚠ ◔ ⚡ ↯ ¿ ⨂ ✖ ⇣ ⇡ ⠁ ⠉ ⠋ ⠛ ⠟ ⠿ ⡿ ⣿ ☹ ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ ▹ ╍ ▪ ⚯ ⚒ ◌ ⇅ ↡ ↟ ⊛ ♺
term-256color.py also worked fine, printing all 256 colours as expected. Screenshots:
I have confirmed that other ncurses apps like Vim work fine with UTF-8 widechars, eg by opening your src/ui_pyroscope.cc in Vim and confirming the special chars all look OK. Finally I also tried chros73's fork, rtorrent-PS-ch 1.8.0/0.9.7, and found it has the same problem - actually it's slightly worse, the views are even more corrupted; maybe just because it uses a different layout.
I've now tried everything I can think of and am out of ideas. Would you have have any idea on how I can debug and resolve this?
Here's my rtorrent-0.9.6/config.log in case it's of use (taken from a compile using the system NCurses 6.0 with ABI=5):
https://gist.github.com/bbe1600d65acf3863f15fac94a600163 . FYI In order to build on Solaris I had to integrate GNULib to provide a portable version of random_r and initstate_r (no glibc in Solaris), so you might notice some unexpected extra logging in config.log because of that.
Let me know if I can provide any further info, and many thanks in advance for any help.
Tom (TheBloke)