We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a142f02 commit b65022bCopy full SHA for b65022b
pygccxml/parser/declarations_cache.py
@@ -23,16 +23,9 @@ def file_signature( filename ):
23
# - This change allows duplicate autogenerated files to be recognized
24
#return os.path.getmtime( source )
25
sig = hashlib.md5()
26
- try:
27
- # try default encoding first
28
- f = open(filename, 'r', encoding='utf-8')
29
- buf = f.read()
30
- except UnicodeDecodeError:
31
- # otherwise, try another common encoding
32
- f.close()
33
- f = open(filename, 'r', encoding='iso8859-1')
34
35
- sig.update(buf.encode('utf-8'))
+ f = open(filename, 'rb')
+ buf = f.read()
+ sig.update(buf)
36
f.close()
37
return sig.hexdigest()
38
0 commit comments