[issue43175] filecmp is not working for UTF-8 BOM file.
suresh
report at bugs.python.org
Fri Feb 19 05:29:44 EST 2021
suresh <sureshvigneshbe at gmail.com> added the comment:
I am getting same file size and are regular files (True) as below.
Could you assist on filecmp any changes required in passing the inputs. Since it returns false.
Code:
>>> os.chdir(r'C:\Users\suresh.n\Files')
>>> open('source.css', 'rb').read() == open('destination.css','rb').read()
True
>>> for f in ('source.css', 'destination.css'):
... print(f, os.path.isfile(f), os.path.getsize(f))
source.css True 37465
destination.css True 37465
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43175>
_______________________________________
More information about the Python-bugs-list
mailing list