Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

SSH session error: ~/powerlevel9k_cfg: 15: character not in range #750

Closed
drew1kun opened this issue Feb 14, 2018 · 8 comments
Closed

SSH session error: ~/powerlevel9k_cfg: 15: character not in range #750

drew1kun opened this issue Feb 14, 2018 · 8 comments

Comments

@drew1kun
Copy link

drew1kun commented Feb 14, 2018

Good day.
I have set up oh-my-zsh with powerlevel9k on both of my mac machines and it works fine without errors.

But when I ssh from one to another, I get the following warning/error:

~/powerlevel9k_cfg: 15: character not in range

Locales:

user@macbook% locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

Again, this message does not pop up on the machines - only when establishing SSH session.
sshd_config:

AuthorizedKeysFile ssh/authorized_keys
UsePAM yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/libexec/sftp-server

What could be a reason of this error?

@drew1kun
Copy link
Author

drew1kun commented Feb 17, 2018

Ok, kinda figured this out.. for some reason my custom config variables looked like this:

...
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=$'\uE0B0'
...

Although, IT RENDERS THE THEME PROPERLY (That is why it is so hard to find out), it must be set like:

...
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR="\uE0B0"
...

Otherwise it returns the error above... Also, if it is set properly, but the error still appears (happened to me on Debian), then it is a locale problem which can be fixed as described here

@bhilburn
Copy link
Member

@drew-kun - Oh wow, that's a subtle detail! I'm glad you got it figured out =)

Would you be up for adding a note about this to the Troubleshooting wiki?

@onaforeignshore
Copy link
Contributor

IIRC, this was discussed quite a while ago on Gitter, but I can't remember why we need the $ in front? All the UNICODE icons are declared this way in icons.zsh.

@drew1kun
Copy link
Author

@bhilburn Sure I will modify the wiki and make a pull request later when I have time ;)

@bhilburn
Copy link
Member

@drew-kun - Thanks so much! Feel free to edit the wiki without a PR - it's open-access.

@drew1kun
Copy link
Author

drew1kun commented Feb 20, 2018

where would I put screenshots?
I will look much nicer and informative with screenshots

@bhilburn
Copy link
Member

Ah, yes, screenshots. Use the old "Issue Image" trick ;)

Basically, post your screenshots here. Then, use those image URLs in the wiki. Quick and easy!

@drew1kun
Copy link
Author

Incorrect rendering with POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=$'\uE0B0'
ssh_incorrect

Correct rendering with POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR="\uE0B0" format
correct

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

No branches or pull requests

3 participants