Python Forum
filecmp is not working for UTF-8 BOM encoded files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
filecmp is not working for UTF-8 BOM encoded files
#1
Python base package filecmp is not working properly for 'UTF-8 BOM' css files.
I am using python version 3.5 and windows 10 OS.

while running the below code getting as False always.However the file content are same.

Code :
import filecmp
filecmp.clear_cache()        
boolfile=filecmp.cmp(r'C:\Users\suresh.n\python\RPA\Page\Sowmiya\downloads\destination.txt',r'C:\Users\suresh.n\python\RPA\Page\Sowmiya\source\source[url=C:\Users\suresh.n\python\RPA\Page\Sowmiya\downloads]C:\Users\suresh.n\python\RPA\Page\Sowmiya\downloads.txt',shallow=False) 
print(boolfile) 
output
Output:
False.
sourcefile
destinationfile


Please let me know if any details required.
buran write Feb-09-2021, 06:26 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.


Also, there is no way links to files on your local C:\ drive to work on forum.
Reply


Messages In This Thread
filecmp is not working for UTF-8 BOM encoded files - by sureshnagarajan - Feb-09-2021, 05:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Can you put encoded strings into .txt files? Alivegamer 0 1,276 May-04-2022, 12:50 AM
Last Post: Alivegamer
  Working with excel files arsouzaesilva 6 3,229 Sep-17-2021, 06:52 PM
Last Post: arsouzaesilva
Question Working with existing files Gilush 7 3,087 Feb-10-2021, 08:55 PM
Last Post: Gilush
  get original code after being encoded to UTF-8 ashok 18 5,950 Sep-08-2020, 04:17 AM
Last Post: ndc85430
  Trouble with encoded data (I think) fishglue 0 1,814 Oct-10-2019, 08:15 PM
Last Post: fishglue
  working with more excel files Krszt 1 2,478 Mar-13-2019, 11:41 AM
Last Post: perfringo
  Working with files and dictionaries OmarSinno 1 2,623 Oct-30-2017, 11:02 AM
Last Post: wavic
  convert hex encoded string to ASCII Skaperen 4 114,480 Oct-02-2016, 09:22 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020