{"record":{"id":"3a619685d276324e","repo":"zellij-org/zellij","slug":"not-valid-utf8-encoding","errorCode":null,"errorMessage":"Not valid Utf8 Encoding","messagePattern":"Not valid Utf8 Encoding","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zellij-server/src/os_input_output.rs","lineNumber":162,"sourceCode":"                }\n            }\n            let mut command = default_editor.unwrap_or_else(|| {\n                PathBuf::from(\n                    env::var(\"EDITOR\")\n                        .unwrap_or_else(|_| env::var(\"VISUAL\").unwrap_or_else(|_| \"vi\".into())),\n                )\n            });\n\n            let mut args = vec![];\n\n            if !command.is_dir() {\n                separate_command_arguments(&mut command, &mut args);\n            }\n            let file_to_open = payload\n                .path\n                .into_os_string()\n                .into_string()\n                .expect(\"Not valid Utf8 Encoding\");\n            if let Some(line_number) = payload.line_number {\n                if command.ends_with(\"vim\")\n                    || command.ends_with(\"nvim\")\n                    || command.ends_with(\"emacs\")\n                    || command.ends_with(\"nano\")\n                    || command.ends_with(\"kak\")\n                {\n                    failover_cmd_args = Some(vec![file_to_open.clone()]);\n                    args.push(format!(\"+{}\", line_number));\n                    args.push(file_to_open);\n                } else if command.ends_with(\"hx\") || command.ends_with(\"helix\") {\n                    // at the time of writing, helix only supports this syntax\n                    // and it might be a good idea to leave this here anyway\n                    // to keep supporting old versions\n                    args.push(format!(\"{}:{}\", file_to_open, line_number));\n                } else {\n                    args.push(file_to_open);\n                }","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/zellij-org/zellij/blob/bf8d23a4f774abf27a108da2a1a2689e7d8d0d23/zellij-server/src/os_input_output.rs#L144-L180","documentation":"Error \"Not valid Utf8 Encoding\" thrown in zellij-org/zellij.","triggerScenarios":"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.","commonSituations":"Programs emitting other encodings or binary data to stdout.","solutions":["Ensure the data written to the terminal is valid UTF-8.","Check the running command's output encoding (set LANG/LC_ALL to a UTF-8 locale)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf8d23a4f774abf27a108da2a1a2689e7d8d0d23","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}