quadroid
quadroid

Reputation: 8950

WebStorm Terminal Encoding / Font problem

I have problem with the Encoding of WebStorm (and other IntelliJ derivatives). I Installed it a view Minutes ago so no custom configuration is involved. I am on a Mac.

When I start a Terminal inside WebStorm I get the following prompt:

_p9k_get_icon:14: character not in range                                                                                                                                                                                                                                                                                                                                
Raphaels-MBP% 

The powerline is not working, the path is missing, and the _p9k.... stuff keeps popping up on every line.

On iTerm and vscode it looks like this

enter image description here

I use the same font as inside iTerm and vsCcode. If I check the locale everything has a different setting:

vscode:

~/Source ❯ locale
LANG="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL=

iTerm:

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

WebStorm and other IntelliJ:

locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

If I set the locale to en_GB.UTF-8 and start another zsh, the error (character not in range) is gone, but the powerline is still not working.

after export LC_ALL="en_GB.UTF-8"

Raphaels-MBP% locale
LANG="en_DE.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"

What am I missing?

Upvotes: 1

Views: 657

Answers (1)

Pedro Câmara
Pedro Câmara

Reputation: 31

Going to Preferences -> Tools -> Terminal and setting the following environment variable: LC_CTYPE=UTF-8 fixed it for me, but it just works for the current project.

For a more permanent solution, you can add export LC_CTYPE=UTF-8 to the top of your ~/.zshrc.

Upvotes: 3

Related Questions