Skip to content

Instantly share code, notes, and snippets.

@yeiichi
Last active August 1, 2020 03:35
Show Gist options
  • Save yeiichi/d4972751d0bbb8d4563d23aec5f9cfb5 to your computer and use it in GitHub Desktop.
Save yeiichi/d4972751d0bbb8d4563d23aec5f9cfb5 to your computer and use it in GitHub Desktop.
my chardet
import chardet
with open(file_path, 'rb') as f:
encoding = chardet.detect(f.read()).get('encoding')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment