saulpw / visidata

A terminal spreadsheet multitool for discovering and arranging data
http://visidata.org
GNU General Public License v3.0
7.92k stars 284 forks source link

rendering goes wrong (control chars are shown) #2426

Closed lodagro closed 3 months ago

lodagro commented 4 months ago

Small description

Data to reproduce

https://jsvine.github.io/intro-to-visidata/_downloads/a61d9b28e9a942e1254bffeb8289a447/faa-wildlife-strikes.csv

Steps to reproduce

vd faa-wildlife-strikes.csv Create frequency table

Expected result

image

vd version 2.11.1

Actual result with screenshot

vd version 3.0.2

image

Configuration

yes

latest release: yes saul.pw/VisiData v3.1dev: yes

Additional context

Linux

3.10.0

gnome-terminal and xterm

midichef commented 4 months ago

Thanks for giving detailed configurations descriptions.

Can you describe your Linux system more specifically? Which distribution (Ubuntu, or Debian, or Fedora, etc) and specific version (for example, my Ubuntu version is 22.04.4)? cat /etc/os-release may help with this, specifically the VERSION= line.

Also, what is your terminal version: gnome terminal --version

And can you give more details on your terminal settings? What is the output of these commands (the last 2 may not exist on your system): echo $TERM echo $LANG tset -q locale

lodagro commented 4 months ago
❯ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
❯ gnome-terminal --version
# GNOME Terminal 3.28.2 using VTE 0.52.4 +GNUTLS
❯ echo $TERM
screen-256color
❯ echo $LANG
en_US.UTF-8
❯ tset -q
screen-256color
❯ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
midichef commented 4 months ago

I have not yet been able to get access to a CentOS system where I can reproduce this behavior.

Your TERM variable suggests to me that you are set up to use tmux or screen. Perhaps the behavior is related to this.

Can you try two things and report back? What happens if you open xterm and then in the shell there, run export TERM=xterm-256color and then run vd there? And what happens if you run gnome-terminal, and in that window, export TERM=gnome-256color, and then run vd there?

lodagro commented 3 months ago

tmux is what i use.

Below is the result of the two experiments (using saul.pw/VisiData v3.0.2).

xterm

export TERM=xterm-256color

image

gnome-terminal

export TERM=gnome-256color

image

lodagro commented 3 months ago

After upgrading tmux to version 3.4, rendering is ok with visidata 3.0.2. The older tmux version i was using was version 3.1b.

saulpw commented 3 months ago

So weird. Glad you got it working though, @lodagro!