jdx/mise · error
tracking does not support non-UTF-8 filenames
Error message
tracking does not support non-UTF-8 filenames
What it means
`ensure_portable_ancestors` refuses to track (enroll) a path whose textual representation is not valid UTF-8. Portable tracking relies on mapping paths through home/config roots across machines, and non-UTF-8 filenames (common on Unix raw bytes) cannot round-trip through mise's string-based config and alias logic.
Solutions
- Rename the offending file/directory to a valid UTF-8 name, then re-run the tracking command.
- Exclude the non-UTF-8 path from tracking and track only its UTF-8-named ancestors/contents.
- Fix the system locale (`LANG`/`LC_ALL` to a UTF-8 value) and recreate the file so the name is encoded as UTF-8.
Example fix
// before (shell) mv $'caf\xe9.txt' 'café.txt' mise use --path ./café.txt // after mise use --path ./café.txt # works once all path components are valid UTF-8
Defensive patterns
Strategy: type-guard
Validate before calling
fn is_utf8_path(p: &std::path::Path) -> bool { p.to_str().is_some() } Type guard
let name = match path.to_str() { Some(s) => s, None => { eprintln!("skip non-UTF-8 path: {}", path.display()); return; } }; Prevention
- Use UTF-8 filenames for anything you intend to track/sync.
- Set LANG/LC_ALL to a UTF-8 locale before creating files.
- Exclude non-UTF-8 paths from dotfile enrollment.
When it happens
Trigger: Calling `add_requests` → `ensure_portable_ancestors(path)` where `path.to_str()` returns `None` because the path contains invalid UTF-8 bytes in any component.
Common situations: Enrolling a file created with non-UTF-8 locale/filename bytes (e.g. Latin-1 filename from an archive extraction); syncing dotfiles that include oddly named downloads; Linux systems without a UTF-8 locale.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- history cannot represent a non-UTF-8 filename; refusing to…
- glob pattern is not valid UTF-8
- the prefix cannot be printed as a single UTF-8 path; use a…
- truncated text: bytes is not a whole number of code units
- a parent directory is now a symlink; left untouched
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/15db8e49176feb93.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/history/tracked.rs:795
pub(crate) fn tree_path_to_display(tree_path: &str) -> String {
let (stem, rest) = tree_path.split_once('/').unwrap_or((tree_path, ""));
let root = stem.split('@').next().unwrap_or(stem);
if root == "config" {
display_path(global_config_dir().join(rest))
} else if root == "home" {
format!("~/{rest}")
} else if let Some(rest) = tree_path.strip_prefix("fs/") {
format!("/{rest}")
} else {
tree_path.to_string()
}
}
/// Root aliases are portable through the home/config mapping. Aliases below
/// those roots are not: canonicalizing them would silently change the enrolled
/// destination on another machine. The leaf itself may still be a symlink.
pub(crate) fn ensure_portable_ancestors(path: &Path) -> Result<()> {
eyre::ensure!(
path.to_str().is_some(),
"tracking does not support non-UTF-8 filenames"
);
let roots = super::sync::layout::Roots::current();
let bases = [
dirs::HOME.to_path_buf(),
global_config_dir(),
roots.home,
roots.config_dir,
];
let relative = |base: &Path| {
let mut components = path.components();
for expected in base.components() {
let actual = components.next()?;
if actual != expected
&& !(cfg!(windows)
&& actual
.as_os_str()View on GitHub (pinned to 533346cc37)