Skip to content

Instantly share code, notes, and snippets.

@xtman
Created September 20, 2022 08:02
Show Gist options
  • Select an option

  • Save xtman/0dcbe2fb78e4a1a744e172d083f76108 to your computer and use it in GitHub Desktop.

Select an option

Save xtman/0dcbe2fb78e4a1a744e172d083f76108 to your computer and use it in GitHub Desktop.

Revisions

  1. xtman created this gist Sep 20, 2022.
    4 changes: 4 additions & 0 deletions detect_file_name_encoding.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    import os
    import chardet
    for n in os.listdir('.'):
    print(chardet.detect(os.fsencode(n)))