Skip to content

Commit

Permalink
Use the encoded_bytes() APIs for portable OsString handling
Browse files Browse the repository at this point in the history
  • Loading branch information
blyxxyz committed Nov 26, 2023
1 parent 327a920 commit 2ed9095
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 244 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Short options may be unicode, but only a single codepoint (a `char`).

Options can be combined with non-unicode arguments. That is, `--option=���` will not cause an error or mangle the value.

Options themselves are patched as by [`String::from_utf8_lossy`](https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy) if they're not valid unicode. That typically means you'll raise an error later when they're not recognized.
Options themselves are patched with replacement characters similar to [`String::from_utf8_lossy`](https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy) if they're not valid unicode. That typically means you'll raise an error later when they're not recognized.

## Why?
For a particular application I was looking for a small parser that's pedantically correct. There are other compact argument parsing libraries, but I couldn't find one that handled `OsString`s and implemented all the fiddly details of the argument syntax faithfully.
Expand Down
Loading

0 comments on commit 2ed9095

Please sign in to comment.