mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-21 13:21:05 +00:00
tool/create_packet_log: try to deal with windows 16-bit unicode by dropping \0 characters
This commit is contained in:
parent
29f287b5e3
commit
e698d63d6c
@ -107,11 +107,13 @@ with open (outfile, 'wb') as fout:
|
||||
line_conter = 0
|
||||
for line in fin:
|
||||
try:
|
||||
# try to deal with windows 16-bit unicode by dropping \0 characters
|
||||
line = ''.join([c for c in line if c != '\0'])
|
||||
line_conter += 1
|
||||
timestamp = None
|
||||
# strip newlines
|
||||
line = line.strip("\n\r")
|
||||
# skip empyt lines
|
||||
# skip empty lines
|
||||
if len(line) == 0:
|
||||
continue
|
||||
parts = re.match('\[(.*)\] (.*)', line)
|
||||
|
Loading…
x
Reference in New Issue
Block a user