R bindings of the 'uchardet', encoding detector library from Mozilla (<https://www.freedesktop.org/wiki/Software/uchardet/>). It takes a sequence of bytes in an unknown character encoding and without any additional information, and attempts to get the encoding of the text. All return names of the encodings are iconv-compatible.
copied from cf-staging / r-uchardet