zellij-org/zellij · error

Not valid Utf8 Encoding

Error message

Not valid Utf8 Encoding

What it means

Error "Not valid Utf8 Encoding" thrown in zellij-org/zellij.

Solutions

  1. Ensure the data written to the terminal is valid UTF-8.
  2. Check the running command's output encoding (set LANG/LC_ALL to a UTF-8 locale).

When it happens

Trigger: Occurs at zellij-server/src/os_input_output.rs:162 when the operation fails: "Not valid Utf8 Encoding". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.

Common situations: Programs emitting other encodings or binary data to stdout.


AI-assisted analysis of zellij-org/zellij@bf8d23a4f7 (2026-08-19). Data as JSON: /api/errors/3a619685d276324e. Report an issue: GitHub.

Appendix: source

Thrown at zellij-server/src/os_input_output.rs:162

                }
            }
            let mut command = default_editor.unwrap_or_else(|| {
                PathBuf::from(
                    env::var("EDITOR")
                        .unwrap_or_else(|_| env::var("VISUAL").unwrap_or_else(|_| "vi".into())),
                )
            });

            let mut args = vec![];

            if !command.is_dir() {
                separate_command_arguments(&mut command, &mut args);
            }
            let file_to_open = payload
                .path
                .into_os_string()
                .into_string()
                .expect("Not valid Utf8 Encoding");
            if let Some(line_number) = payload.line_number {
                if command.ends_with("vim")
                    || command.ends_with("nvim")
                    || command.ends_with("emacs")
                    || command.ends_with("nano")
                    || command.ends_with("kak")
                {
                    failover_cmd_args = Some(vec![file_to_open.clone()]);
                    args.push(format!("+{}", line_number));
                    args.push(file_to_open);
                } else if command.ends_with("hx") || command.ends_with("helix") {
                    // at the time of writing, helix only supports this syntax
                    // and it might be a good idea to leave this here anyway
                    // to keep supporting old versions
                    args.push(format!("{}:{}", file_to_open, line_number));
                } else {
                    args.push(file_to_open);
                }

View on GitHub (pinned to bf8d23a4f7)