Hi, I tried running the crate on mobi files downloaded from Project Gutenberg.
But I am always hit with the utf8 decode failed - invalid utf-8 sequence of 1 bytes from index .... error.
Here's my implementation –
use std::error::Error;
use mobi::Mobi;
pub fn extract(file: &String) -> Result<String, Box<dyn Error>> {
let mobi_file = Mobi::from_path(file)?;
let text = mobi_file.content_as_string()?;
Ok(text)
}
Hi, I tried running the crate on mobi files downloaded from Project Gutenberg.
But I am always hit with the
utf8 decode failed - invalid utf-8 sequence of 1 bytes from index ....
error.Here's my implementation –
I am using
rustc 1.76.0
andmobi = "0.8.0"
.Is the issue in the crate or my implementation?