This is example using third party library to detect language and charsets of document