Add detect_encoding() function and adapt docs
Fix repository URL in README.md