-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Invalid Unicode Handling #269
Comments
kbknapp
added
C-enhancement
Category: Raise on the bar on expectations
D: intermediate
A-parsing
Area: Parser's logic and needs it changed somehow.
and removed
C-enhancement
Category: Raise on the bar on expectations
labels
Sep 22, 2015
kbknapp
changed the title
Tracking Issue: Invalid Unicode Handling
RFC: Invalid Unicode Handling
Sep 22, 2015
👍 |
kbknapp
added a commit
that referenced
this issue
Jan 23, 2016
kbknapp
added a commit
that referenced
this issue
Jan 25, 2016
Closed with 2x |
kbknapp
added a commit
that referenced
this issue
Jan 28, 2016
kbknapp
added a commit
that referenced
this issue
Jan 28, 2016
This is awesome! The ability to accept any filename is great, and the API is cool, and I love you all. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is to discuss how invalid unicode should be handled in 2.x and 1.x
Currently
panic!
on invalid unicode (the default)Err
on invalid unicode using the*_safe()
methodsU+FFFD
using*_lossy()
methodsProblems
lossy
,safe
, andregular
version ofget_matches
is somewhat messy. Granted in practice it's not an issue because you only use one version of that method...but for API space it looks a mess.Future
One idea is to store the values internally in the
ArgMatches
struct as anOsString
and by default give a&str
, but allows the users the option to get anOsStr
instead. This is the opt-in to invalid unicode. I am a firm believer the default should be strict unicode, but we should allows users to handle invalid unicode if they so choose.Questions
How does this affect Windows? Or does it even affect Windows? If yes, should we use a
#[cfg(not(windows))]
, or similar?Question, comments, suggestions?
The text was updated successfully, but these errors were encountered: