mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-10 01:05:42 +00:00
in claralogConverter.py, use Latin-1 encoding to be tolerant against noisy log files
This commit is contained in:
parent
701ab1b492
commit
4274e8b8a1
1 changed files with 3 additions and 3 deletions
|
@ -47,11 +47,11 @@ def convertClaralogToTxt(inputFileName):
|
||||||
if (os.path.isfile(os.path.join(directory, outputFileName))):
|
if (os.path.isfile(os.path.join(directory, outputFileName))):
|
||||||
print("output file " + outputFileName + " already exists. Nothing to do.")
|
print("output file " + outputFileName + " already exists. Nothing to do.")
|
||||||
return
|
return
|
||||||
fileIn = open(inputFileName, 'r')
|
fileIn = open(inputFileName, 'r', encoding="Latin-1")
|
||||||
fileOut = open(outputFileName, 'w')
|
fileOut = open(outputFileName, 'w', encoding="Latin-1")
|
||||||
print("# generated by claralogConverter.py", file=fileOut)
|
print("# generated by claralogConverter.py", file=fileOut)
|
||||||
print("# https://github.com/uhi22/pyPLC", file=fileOut)
|
print("# https://github.com/uhi22/pyPLC", file=fileOut)
|
||||||
fileOutValues = open(inputFileName + '.values.txt', 'w')
|
fileOutValues = open(inputFileName + '.values.txt', 'w', encoding="Latin-1")
|
||||||
print("# generated by claralogConverter.py", file=fileOutValues)
|
print("# generated by claralogConverter.py", file=fileOutValues)
|
||||||
print("# https://github.com/uhi22/pyPLC", file=fileOutValues)
|
print("# https://github.com/uhi22/pyPLC", file=fileOutValues)
|
||||||
fileOutStatistics = open(directory + '/pcap_statistics.txt', 'a')
|
fileOutStatistics = open(directory + '/pcap_statistics.txt', 'a')
|
||||||
|
|
Loading…
Reference in a new issue