Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons aren't rendered when vifm is invoked from vim #48

Closed
lockejan opened this issue Jul 16, 2020 · 3 comments
Closed

Icons aren't rendered when vifm is invoked from vim #48

lockejan opened this issue Jul 16, 2020 · 3 comments

Comments

@lockejan
Copy link

lockejan commented Jul 16, 2020

Hi, I'm using alacritty 0.4.3 (c723247) on OSX 10.15.5 with tmux 3.1b

vifm -v gives me:

Version: 0.10.1
Git info: built out of repository
Compiled at: Aug  1 2019 13:13:13

Support of extended keys is on
Parsing of .desktop files is enabled
Without GTK+ library
Without magic library
Without X11 library
Without dynamic loading of X11 library
With file program
With -n option for cp and mv
With remote command execution

My vifm config includes the icon settings from this post: vifm-issue 164
So in a regular vifm session (right side on img) icons are rendered as expected.
However when I'm invoking vifm from inside vim icons arent rendered at all (left side on img).
Im using MesloLGS Nerd Font Mono as my terminal font.

Any ideas why this is happening or how I can debug this?
I tried this with iterm

image

@xaizek
Copy link
Member

xaizek commented Jul 16, 2020

Hello,

The picture looks like UTF-8 sequences were interpreted as something else, therefore I suspect it might be encoding/locale issues. You can try comparing locales inside Vim's terminal and in a regular terminal as well as Vim's settings related to encoding.

@lockejan
Copy link
Author

Thanks for helping me out here, even though I was looking at the wrong place for a solution.
Indeed locale/encoding was the problem here.
My terminal env:

❯ locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

I had to explicitly set LC_ALL and LANG in my shell or terminal config to fix it.
I still wonder how vifm outside of vim managed to interprete the icons correctly then in the first place.

@xaizek
Copy link
Member

xaizek commented Jul 16, 2020

I still wonder how vifm outside of vim managed to interprete the icons correctly then in the first place.

The issue was probably with Vim re-encoding characters. Terminal understands it if Vifm prints them as is, but Vim in the middle transformed them somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants