[issue43175] filecmp is not working for UTF-8 BOM file.

2021-03-18 Thread Eryk Sun


Eryk Sun  added the comment:

I'm closing this as not a bug. You showed that all of the criteria used in a 
non-shallow comparison are the same on your end, i.e. they're both regular 
files with the same reported size and the same contents. Something is going on, 
which is a mystery, but it's not a bug in os.stat() or filecmp.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-19 Thread suresh


suresh  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-16 Thread Eryk Sun


Eryk Sun  added the comment:

The two files in "files.zip" have the same contents:

>>> open('source.css', 'rb').read() == open('destination.css', 'rb').read()
True

Maybe there's something peculiar about the stat results. Check that they're 
both reported as regular files with the same size:

import os
for f in ('source.css', 'destination.css'):
print(f, os.path.isfile(f), os.path.getsize(f))

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-15 Thread suresh


suresh  added the comment:

Dear Team,

  Any more details are required. Kindly let me know.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-11 Thread suresh


suresh  added the comment:

Please find the below Code and attached the files, expecting true as output and 
getting as false: 
 

"import filecmp

filecmp.clear_cache()

boolfile=filecmp.cmp(r'C:\destination.css',r'C:\source.css',shallow=False)

print(boolfile)"

--
hgrepos: +398
Added file: https://bugs.python.org/file49802/files.zip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-09 Thread Steve Dower


Steve Dower  added the comment:

I think you copy-pasted that code snippet incorrectly, because it has 
mismatched quotes.

Can you paste the correct code?

Also, please attach both files that are not comparing equal, ideally in a ZIP 
file (to avoid any modifications in transit), so that we can reproduce the 
issue.

--
components: +Library (Lib) -Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-08 Thread suresh


New submission from suresh :

Python base package filecmp is not working properly for 'UTF-8 BOM' css files.
I am using python version 3.6 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,r'C:\Users\suresh.n\python\RPA\Page\Sowmiya\downloads.txt',shallow=False)
print(boolfile)

--
components: Windows
files: source.txt
hgrepos: 397
messages: 386692
nosy: paul.moore, steve.dower, suresh, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: filecmp is not working for UTF-8 BOM file.
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file49798/source.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com