View Source
CharsetDetect
(CharsetDetect v0.1.1)
CharsetDetect is a simple wrapper around the chardetng crate.
Summary
Guess the encoding of a string.
Guess the encoding of a string (exceptional).
Functions
Guess the encoding of a string.
Examples
iex> File.read!("test/assets/sjis.txt") |> CharsetDetect.guess
{:ok, "Shift_JIS"}
Guess the encoding of a string (exceptional).
Examples
iex> File.read!("test/assets/big5.txt") |> CharsetDetect.guess!
"Big5"