rust-chardet

rust version of chardet

Rust-Chardet

Rust version of chardet.

Usage

Put this in your Cargo.toml:

toml [dependencies] chardet = "0.2"

Then put this in your crate root:

rust extern crate chardet;

To detect charset:

```rust use chardet;

let resultfile:(String, f32, String) = chardet::detectfile("FilePath"); // resultfile.0 Encode // resultfile.1 Confidence // result_file.2 Language

let mut bindata:Vec = Vec::new(); // load file/data into bindata let resultvec:(String, f32, String) = chardet::detect(&bindata); // resultvec.0 Encode // resultvec.1 Confidence // resultvec.2 Language ```