CharsetDetect is a simple wrapper around the chardetng crate.
Guess the encoding of a string.
Guess the encoding of a string (exceptional).
@spec guess(binary()) :: {:ok, String.t()} | {:error, String.t()}
iex> File.read!("test/assets/sjis.txt") |> CharsetDetect.guess {:ok, "Shift_JIS"}
@spec guess!(binary()) :: String.t()
iex> File.read!("test/assets/big5.txt") |> CharsetDetect.guess! "Big5"