zsh-vi-mode icon indicating copy to clipboard operation
zsh-vi-mode copied to clipboard

Illegal byte sequence error when typing æ ø å

Open Napam opened this issue 1 year ago • 2 comments

General information

  • Terminal program: kitty, macos terminal (tried with and without tmux)
  • Operating system: macOS Ventura 13.4
  • ZSH framework: oh-my-zsh
  • ZSH version: 5.9
  • ZVM version: commit c4fc3a6 (a little newer than v0.9.0)

Basic examination

  • [x] I have read through the README page
  • [x] I have the latest version of zsh-vi-mode
  • [x] I have tested with another terminal program

Problem description

I have a norwegian keyboard, which has the æ ø å keys. When I press any of them I get the following error:

zvm_update_repeat_commands:18: regex matching error: illegal byte sequence

Reproduction steps

  1. Type any of the æ ø å characters

Expected behavior

Should be no error popping up

Napam avatar Jun 15 '23 19:06 Napam

For some unrelated reasons I stopped installing this through oh-my-zsh, and did a manual installation instead. That happened to fix the problem.

Napam avatar Jun 21 '23 20:06 Napam

Unfortunately the problem appeared again 😢 I have just cloned this repo and I just source it from my zshrc.

My setup: kitty 0.28.1 macOS Sonoma 14.4.1 (M2 Pro CPU) zsh 5.9 (x86_64-apple-darwin23.0) commit hash: 287efa19


So after digging a testing a little bit I have observed the following:

  1. When using omz, the æ ø å stuff worked if I just sourced the zvm
  2. Without using omz, æ ø å stuff doesn't work (even though I didn't run it through omz to start with)

After searching about the error I saw that people recommended to do export LANG=C, but the problem then was that the rest of the shell behaved weird. Anyways I tried reverting back to the the setup that worked (with omz) and tried to type locale, and I get the same results with and without omz:

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=

So I guess there some settings that omz does that just makes this work, but I can't figure out what it is.

Napam avatar May 06 '24 18:05 Napam