summaryrefslogtreecommitdiffstats
path: root/src/args.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2017-04-12 17:21:07 -0400
committerAndrew Gallant <jamslam@gmail.com>2017-04-12 18:14:23 -0400
commit7ad23e5565e9dca308c52929571c0609c28291c6 (patch)
treefa8dc70184775a7538a602d2f677f4e53608050f /src/args.rs
parent66efbad871620fe2dbe675438fdc8d9922e72826 (diff)
Use for_label_no_replacement.
This will cause certain unsupported legacy encodings to act as if they don't exist, in order to avoid using an unhelpful (in the context of file searching) "replacement" encoding. Kudos to @hsivonen for chirping about this!
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/args.rs b/src/args.rs
index 48c4ad56..9e941a7b 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -737,7 +737,7 @@ impl<'a> ArgMatches<'a> {
if label == "auto" {
return Ok(None);
}
- match Encoding::for_label(label.as_bytes()) {
+ match Encoding::for_label_no_replacement(label.as_bytes()) {
Some(enc) => Ok(Some(enc)),
None => Err(From::from(
format!("unsupported encoding: {}", label))),