Created
January 31, 2014 00:29
-
-
Save mislav/8723116 to your computer and use it in GitHub Desktop.
Detect encoding of file contents (or STDIN) with charlock_holmes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -r pp -r charlock_holmes -e ' | |
contents = ARGF.read | |
detection = CharlockHolmes::EncodingDetector.detect(contents) | |
pp detection ' "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment