Reputation: 2092
Context
I am using my work server (ubuntu 16.04) as my coding environment. Whenever I open up a typescript file (.ts
), I get a strange rendering issue that makes it hard for me to code. Looking at the picture above, there is (incorrectly) two c
and a character a
from the variable name is missing.
What could be the issue?
Expected code - const storeData = ...
Current display - cconst storeDat = ...
My setup
tmux next-3.3
8.2.1767
When I open the files in the terminal (not in a tmux session), it renders nicely
What I tried
The only thing that made sense to me is set the tmux color, which I did in ~/.tmux.conf
:
set -g default-terminal "screen-256color"
Upvotes: 0
Views: 195
Reputation: 2092
Upon looking at the differences between the 2 images, I suspected it may be because of unsupported utf-8
issue. So I came across this question which suggested setting environment variables:
export LC_ALL=en_IN.UTF-8
export LANG=en_IN.UTF-8
And it turns out I did not have the UTF-8
language pack, so I was getting this issue:
warning: Setting locale failed.
To fix that, I installed the language pack as suggested in the answer:
sudo apt-get install language-pack-en
Now the main issue is fixed! I no longer see the bad display as posted in the original question.
BEWARE - Before forcing tmux
into utf-8
, make sure you backup your tmux sessions. In doing these steps, I lost all my existing tmux sessions and I could not connect to them. I got the error below:
open terminal failed: can't find terminfo database
To fix the issue I had to stop the tmux server and then recreate the previously existing sessions.
tmux kill-server
Upvotes: 1