google / google/argh

Supporting non-UTF-8 paths

Open
#33 8 comments 2 reactions 0 assignees View on GitHub
discussion enhancement help wanted
Dominant language
Rust
Stars
2k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

I love `argh` for its simplicity, compile performance and leanness, and I find myself migrating more and more projects to it.

Just now it became evident that despite supporting `PathBuf` in struct fields, it will always assume valid UTF-8 in the arguments it parses. This might be an assumption that holds in Fuchsia, but may make it impossible to use for general purpose linux tools that consume paths in arguments.

I wonder if there is any chance to allow parsing `PathBuf` fields without making assumptions about their encoding?

Thank you

PS: This question was triggered [by this post](https://www.reddit.com/r/rust/comments/hjn64e/dua_28_disk_usage_analyzer_is_now_430kb_smaller/fwnjjp9?utm_source=share&utm_medium=web2x) on reddit/r/rust.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.