You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Paths and filenames are not necessarily UTF-8 #7225
$ mkdir empty
$ cd empty
$ ls
$ touch $(echo -e "\xff") # `ÿ` in latin1, invalid UTF8, but valid filename
$ ls
?
$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> std::os::list_dir(&Path("."))
rust: task failed at 'assertion failed: is_utf8(v)', /home/huon/rust/src/libstd/str.rs:758
terminate called after throwing an instance of 'rust_task*'
Aborted
Path and all interfaces directly with the file-system should probably use [u8] rather than trying to coerce str to handle these cases. (Similar issue to #7188.)
Activity
bblum commentedon Jul 3, 2013
nominating feature-complete
catamorphism commentedon Sep 5, 2013
Accepted for backwards-compatible
lilyball commentedon Sep 23, 2013
My last referenced commit is a month old, but I'm still working on this issue (currently finishing up the support for Windows paths).
pnkfelix commentedon Sep 27, 2013
The issues here of dealing with filesystems that are not utf8 seem related to #2253, at least tangentially.
Add dispatch task, plus a bunch more updates
path2: Start reimplementing in terms of ~[u8] instead of ~str
Auto merge of rust-lang#7225 - InquisitivePenguin:unnessecary-async, …
Implement a config override for the default #[cfg(test)] in cargo crates