How to check encoding of a CSV file

后端 未结 6 2008
醉梦人生
醉梦人生 2020-12-05 12:41

I have a CSV file and I wish to understand its encoding. Is there a menu option in Microsoft Excel that can help me detect it

OR do I need to make use of programming

6条回答
  •  猫巷女王i
    2020-12-05 13:08

    You can also use python chardet library

    # install the chardet library
    !pip install chardet
    
    # import the chardet library
    import chardet 
    
    # use the detect method to find the encoding
    # 'rb' means read in the file as binary
    with open("test.csv", 'rb') as file:
        print(chardet.detect(file.read()))
    

提交回复
热议问题