diff -pruN 0.1.3-1/Cargo.toml 0.1.4-1/Cargo.toml
--- 0.1.3-1/Cargo.toml	1970-01-01 00:00:00.000000000 +0000
+++ 0.1.4-1/Cargo.toml	1970-01-01 00:00:00.000000000 +0000
@@ -12,11 +12,10 @@
 
 [package]
 name = "encoding_rs_io"
-version = "0.1.3"
+version = "0.1.4"
 authors = ["Andrew Gallant <jamslam@gmail.com>"]
 exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"]
 description = "Streaming transcoding for encoding_rs"
-homepage = "https://github.com/BurntSushi/encoding_rs_io"
 documentation = "https://docs.rs/encoding_rs_io"
 readme = "README.md"
 keywords = ["encoding", "transcoding", "stream", "io", "read"]
diff -pruN 0.1.3-1/Cargo.toml.orig 0.1.4-1/Cargo.toml.orig
--- 0.1.3-1/Cargo.toml.orig	2018-09-25 00:49:55.000000000 +0000
+++ 0.1.4-1/Cargo.toml.orig	2019-01-25 22:16:52.000000000 +0000
@@ -1,10 +1,9 @@
 [package]
 name = "encoding_rs_io"
-version = "0.1.3"  #:version
+version = "0.1.4"  #:version
 authors = ["Andrew Gallant <jamslam@gmail.com>"]
 description = "Streaming transcoding for encoding_rs"
 documentation = "https://docs.rs/encoding_rs_io"
-homepage = "https://github.com/BurntSushi/encoding_rs_io"
 repository = "https://github.com/BurntSushi/encoding_rs_io"
 readme = "README.md"
 keywords = ["encoding", "transcoding", "stream", "io", "read"]
diff -pruN 0.1.3-1/.cargo_vcs_info.json 0.1.4-1/.cargo_vcs_info.json
--- 0.1.3-1/.cargo_vcs_info.json	1970-01-01 00:00:00.000000000 +0000
+++ 0.1.4-1/.cargo_vcs_info.json	1970-01-01 00:00:00.000000000 +0000
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "9b51b7604f1e0592b1fc985d7f2f86734a6e8aad"
+    "sha1": "ed1568089ce0f1e0cf807b13ebba554a35054867"
   }
 }
diff -pruN 0.1.3-1/debian/cargo-checksum.json 0.1.4-1/debian/cargo-checksum.json
--- 0.1.3-1/debian/cargo-checksum.json	2018-10-14 14:14:26.000000000 +0000
+++ 0.1.4-1/debian/cargo-checksum.json	2019-02-09 23:56:19.000000000 +0000
@@ -1 +1 @@
-{"package":"098f6a0ab73a9ba256b71344dc82c6d7e252736ad9db7f4e35345f3a1f8713f5","files":{}}
+{"package":"6c89a56158243c7cde22fde70e452a40dded9d9d9100f71273df19af9be4d034","files":{}}
diff -pruN 0.1.3-1/debian/changelog 0.1.4-1/debian/changelog
--- 0.1.3-1/debian/changelog	2018-10-14 14:14:26.000000000 +0000
+++ 0.1.4-1/debian/changelog	2019-02-09 23:56:19.000000000 +0000
@@ -1,3 +1,10 @@
+rust-encoding-rs-io (0.1.4-1) unstable; urgency=medium
+
+  * Team upload.
+  * Package encoding_rs_io 0.1.4 from crates.io using debcargo 2.2.10
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 10 Feb 2019 00:56:19 +0100
+
 rust-encoding-rs-io (0.1.3-1) unstable; urgency=medium
 
   * Team upload.
diff -pruN 0.1.3-1/debian/control 0.1.4-1/debian/control
--- 0.1.3-1/debian/control	2018-10-14 14:14:26.000000000 +0000
+++ 0.1.4-1/debian/control	2019-02-09 23:56:19.000000000 +0000
@@ -2,7 +2,7 @@ Source: rust-encoding-rs-io
 Section: rust
 Priority: optional
 Build-Depends: debhelper (>= 11),
- dh-cargo (>= 10),
+ dh-cargo (>= 15),
  cargo:native <!nocheck>,
  rustc:native <!nocheck>,
  libstd-rust-dev <!nocheck>,
@@ -13,7 +13,6 @@ Uploaders:
 Standards-Version: 4.2.0
 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/encoding-rs-io]
 Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/encoding-rs-io
-Homepage: https://github.com/BurntSushi/encoding_rs_io
 X-Cargo-Crate: encoding_rs_io
 
 Package: librust-encoding-rs-io-dev
@@ -28,8 +27,8 @@ Provides:
  librust-encoding-rs-io-0+default-dev (= ${binary:Version}),
  librust-encoding-rs-io-0.1-dev (= ${binary:Version}),
  librust-encoding-rs-io-0.1+default-dev (= ${binary:Version}),
- librust-encoding-rs-io-0.1.3-dev (= ${binary:Version}),
- librust-encoding-rs-io-0.1.3+default-dev (= ${binary:Version})
+ librust-encoding-rs-io-0.1.4-dev (= ${binary:Version}),
+ librust-encoding-rs-io-0.1.4+default-dev (= ${binary:Version})
 Description: Streaming transcoding for encoding_rs - Rust source code
  This package contains the source for the Rust encoding_rs_io crate, packaged by
  debcargo for use with cargo and dh-cargo.
diff -pruN 0.1.3-1/debian/copyright.debcargo.hint 0.1.4-1/debian/copyright.debcargo.hint
--- 0.1.3-1/debian/copyright.debcargo.hint	2018-10-14 14:14:26.000000000 +0000
+++ 0.1.4-1/debian/copyright.debcargo.hint	2019-02-09 23:56:19.000000000 +0000
@@ -21,8 +21,8 @@ Comment:
 
 Files: debian/*
 Copyright:
- 2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
- 2018 Ximin Luo <infinity0@debian.org>
+ 2018-2019 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+ 2018-2019 Ximin Luo <infinity0@debian.org>
 License: MIT or Apache-2.0
 
 License: Apache-2.0
diff -pruN 0.1.3-1/src/lib.rs 0.1.4-1/src/lib.rs
--- 0.1.3-1/src/lib.rs	2018-09-25 00:43:46.000000000 +0000
+++ 0.1.4-1/src/lib.rs	2019-01-25 22:10:41.000000000 +0000
@@ -105,6 +105,7 @@ pub struct DecodeReaderBytesBuilder {
     encoding: Option<&'static Encoding>,
     utf8_passthru: bool,
     bom_override: bool,
+    strip_bom: bool,
 }
 
 impl Default for DecodeReaderBytesBuilder {
@@ -125,6 +126,7 @@ impl DecodeReaderBytesBuilder {
             encoding: None,
             utf8_passthru: false,
             bom_override: false,
+            strip_bom: false,
         }
     }
 
@@ -161,8 +163,16 @@ impl DecodeReaderBytesBuilder {
             .map(|enc| enc.new_decoder_with_bom_removal());
         // No need to do BOM detection if we have an explicit encoding.
         let has_detected = !self.bom_override && encoding.is_some();
+        let peeker =
+            if self.utf8_passthru && self.strip_bom {
+                // We only need to do this when utf8_passthru is enabled
+                // because we otherwise setup encoding_rs to strip the BOM.
+                BomPeeker::without_bom(rdr)
+            } else {
+                BomPeeker::with_bom(rdr)
+            };
         Ok(DecodeReaderBytes {
-            rdr: BomPeeker::new(rdr),
+            rdr: peeker,
             decoder: encoding,
             tiny: TinyTranscoder::new(),
             utf8_passthru: self.utf8_passthru,
@@ -242,11 +252,59 @@ impl DecodeReaderBytesBuilder {
         self
     }
 
+    /// Whether or not to always strip a BOM if one is found.
+    ///
+    /// When this is enabled, if a BOM is found at the beginning of a stream,
+    /// then it is ignored. This applies even when `utf8_passthru` is enabled.
+    ///
+    /// This is disabled by default.
+    ///
+    /// # Example
+    ///
+    /// This example shows how to remove the BOM if it's present even when
+    /// `utf8_passthru` is enabled.
+    ///
+    /// ```
+    /// extern crate encoding_rs;
+    /// extern crate encoding_rs_io;
+    ///
+    /// use std::error::Error;
+    /// use std::io::Read;
+    ///
+    /// use encoding_rs_io::DecodeReaderBytesBuilder;
+    ///
+    /// # fn main() { example().unwrap(); }
+    /// fn example() -> Result<(), Box<Error>> {
+    ///     let source_data = &b"\xEF\xBB\xBFfoo\xFFbar"[..];
+    ///     let mut decoder = DecodeReaderBytesBuilder::new()
+    ///         .utf8_passthru(true)
+    ///         .strip_bom(true)
+    ///         .build(source_data);
+    ///
+    ///     let mut dest = vec![];
+    ///     decoder.read_to_end(&mut dest)?;
+    ///     // If `strip_bom` wasn't enabled, then this would include the BOM.
+    ///     assert_eq!(dest, b"foo\xFFbar");
+    ///     Ok(())
+    /// }
+    /// ```
+    pub fn strip_bom(
+        &mut self,
+        yes: bool,
+    ) -> &mut DecodeReaderBytesBuilder {
+        self.strip_bom = yes;
+        self
+    }
+
     /// Give the highest precedent to the BOM, if one is found.
     ///
     /// When this is enabled, and if a BOM is found, then the encoding
     /// indicated by that BOM is used even if an explicit encoding has been
     /// set via the `encoding` method.
+    ///
+    /// This does not override `utf8_passthru`.
+    ///
+    /// This is disabled by default.
     pub fn bom_override(
         &mut self,
         yes: bool,
@@ -558,6 +616,21 @@ mod tests {
         assert_eq!("a", read_to_string(&mut rdr));
     }
 
+    #[test]
+    fn trans_utf16_basic_without_bom() {
+        let srcbuf = vec![0xFF, 0xFE, 0x61, 0x00];
+        let mut rdr = DecodeReaderBytesBuilder::new()
+            .strip_bom(true)
+            .build(&*srcbuf);
+        assert_eq!("a", read_to_string(&mut rdr));
+
+        let srcbuf = vec![0xFE, 0xFF, 0x00, 0x61];
+        let mut rdr = DecodeReaderBytesBuilder::new()
+            .strip_bom(true)
+            .build(&*srcbuf);
+        assert_eq!("a", read_to_string(&mut rdr));
+    }
+
     // Test the BOM override.
     #[test]
     fn trans_utf16_bom_override() {
diff -pruN 0.1.3-1/src/util.rs 0.1.4-1/src/util.rs
--- 0.1.3-1/src/util.rs	2018-09-25 00:46:37.000000000 +0000
+++ 0.1.4-1/src/util.rs	2019-01-25 22:10:27.000000000 +0000
@@ -113,17 +113,23 @@ impl io::Read for TinyTranscoder {
 #[derive(Debug)]
 pub struct BomPeeker<R> {
     rdr: R,
+    strip: bool,
     bom: Option<PossibleBom>,
     nread: usize,
 }
 
 impl<R: io::Read> BomPeeker<R> {
-    /// Create a new BomPeeker.
+    /// Create a new BomPeeker that includes the BOM in calls to `read`.
     ///
     /// The first three bytes can be read using the `peek_bom` method, but
     /// will not advance the reader.
-    pub fn new(rdr: R) -> BomPeeker<R> {
-        BomPeeker { rdr: rdr, bom: None, nread: 0 }
+    pub fn with_bom(rdr: R) -> BomPeeker<R> {
+        BomPeeker { rdr: rdr, strip: false, bom: None, nread: 0 }
+    }
+
+    /// Create a new BomPeeker that never includes the BOM in calls to `read`.
+    pub fn without_bom(rdr: R) -> BomPeeker<R> {
+        BomPeeker { rdr: rdr, strip: true, bom: None, nread: 0 }
     }
 
     /// Peek at the first three bytes of the underlying reader.
@@ -152,7 +158,11 @@ impl<R: io::Read> io::Read for BomPeeker
     fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
         if self.nread < 3 {
             let bom = self.peek_bom()?;
-            let bom = bom.as_slice();
+
+            // If we don't have a valid BOM (e.g., no encoding for it), then
+            // we always pass through the first 3 bytes. Otherwise, if we have
+            // a valid BOM, we only pass it thru if we don't want to strip it.
+            let bom = bom.as_slice(!self.strip);
             if self.nread < bom.len() {
                 let rest = &bom[self.nread..];
                 let len = cmp::min(buf.len(), rest.len());
@@ -186,14 +196,26 @@ impl PossibleBom {
     }
 
     /// Return the BOM as a normal slice.
-    fn as_slice(&self) -> &[u8] {
-        &self.bytes[0..self.len]
+    ///
+    /// If `bom` is true, then this includes any leading BOM bytes. Otherwise,
+    /// this only includes non-BOM bytes.
+    fn as_slice(&self, bom: bool) -> &[u8] {
+        let slice = &self.bytes[0..self.len];
+        if bom || slice.len() <= 1 {
+            slice
+        } else if &slice[0..2] == b"\xFF\xFE" || &slice[0..2] == b"\xFE\xFF" {
+            &slice[2..]
+        } else if slice == b"\xEF\xBB\xBF" {
+            &[]
+        } else {
+            slice
+        }
     }
 
     /// If this is a valid UTF-8 or UTF-16 BOM, return its corresponding
     /// encoding. Otherwise, return `None`.
     pub fn encoding(&self) -> Option<&'static Encoding> {
-        let bom = self.as_slice();
+        let bom = self.as_slice(true);
         if bom.len() < 3 {
             return None;
         }
@@ -308,7 +330,7 @@ mod tests {
     #[test]
     fn peeker_empty() {
         let buf = [];
-        let mut peeker = BomPeeker::new(&buf[..]);
+        let mut peeker = BomPeeker::with_bom(&buf[..]);
         assert_eq!(PossibleBom::new(), peeker.peek_bom().unwrap());
 
         let mut tmp = [0; 100];
@@ -318,7 +340,7 @@ mod tests {
     #[test]
     fn peeker_one() {
         let buf = [1];
-        let mut peeker = BomPeeker::new(&buf[..]);
+        let mut peeker = BomPeeker::with_bom(&buf[..]);
         assert_eq!(
             PossibleBom { bytes: [1, 0, 0], len: 1},
             peeker.peek_bom().unwrap());
@@ -332,7 +354,7 @@ mod tests {
     #[test]
     fn peeker_two() {
         let buf = [1, 2];
-        let mut peeker = BomPeeker::new(&buf[..]);
+        let mut peeker = BomPeeker::with_bom(&buf[..]);
         assert_eq!(
             PossibleBom { bytes: [1, 2, 0], len: 2},
             peeker.peek_bom().unwrap());
@@ -347,7 +369,7 @@ mod tests {
     #[test]
     fn peeker_three() {
         let buf = [1, 2, 3];
-        let mut peeker = BomPeeker::new(&buf[..]);
+        let mut peeker = BomPeeker::with_bom(&buf[..]);
         assert_eq!(
             PossibleBom { bytes: [1, 2, 3], len: 3},
             peeker.peek_bom().unwrap());
@@ -363,7 +385,7 @@ mod tests {
     #[test]
     fn peeker_four() {
         let buf = [1, 2, 3, 4];
-        let mut peeker = BomPeeker::new(&buf[..]);
+        let mut peeker = BomPeeker::with_bom(&buf[..]);
         assert_eq!(
             PossibleBom { bytes: [1, 2, 3], len: 3},
             peeker.peek_bom().unwrap());
@@ -381,7 +403,7 @@ mod tests {
     #[test]
     fn peeker_one_at_a_time() {
         let buf = [1, 2, 3, 4];
-        let mut peeker = BomPeeker::new(&buf[..]);
+        let mut peeker = BomPeeker::with_bom(&buf[..]);
 
         let mut tmp = [0; 1];
         assert_eq!(0, peeker.read(&mut tmp[..0]).unwrap());
@@ -395,4 +417,36 @@ mod tests {
         assert_eq!(1, peeker.read(&mut tmp).unwrap());
         assert_eq!(4, tmp[0]);
     }
+
+    #[test]
+    fn peeker_without_bom() {
+        let buf = [b'\xEF', b'\xBB', b'\xBF', b'a'];
+        let mut peeker = BomPeeker::without_bom(&buf[..]);
+        assert_eq!(
+            PossibleBom { bytes: [b'\xEF', b'\xBB', b'\xBF'], len: 3},
+            peeker.peek_bom().unwrap());
+
+        let mut tmp = [0; 100];
+        assert_eq!(1, peeker.read(&mut tmp).unwrap());
+        assert_eq!(b'a', tmp[0]);
+        assert_eq!(0, peeker.read(&mut tmp).unwrap());
+    }
+
+    #[test]
+    fn peeker_without_bom_nobom() {
+        let buf = [1, 2, 3, 4];
+        let mut peeker = BomPeeker::without_bom(&buf[..]);
+        assert_eq!(
+            PossibleBom { bytes: [1, 2, 3], len: 3},
+            peeker.peek_bom().unwrap());
+
+        let mut tmp = [0; 100];
+        assert_eq!(3, peeker.read(&mut tmp).unwrap());
+        assert_eq!(1, tmp[0]);
+        assert_eq!(2, tmp[1]);
+        assert_eq!(3, tmp[2]);
+        assert_eq!(1, peeker.read(&mut tmp).unwrap());
+        assert_eq!(4, tmp[0]);
+        assert_eq!(0, peeker.read(&mut tmp).unwrap());
+    }
 }
