I did fix this by using python script, but if python script can do it, then sabnzbd can do it better and auto detect the file encoding and try to parse it as utf-8 file.
This is the script I use to fix those "not well-formed" nzb files.
Code: Select all
import pathlib
files = list(pathlib.Path().rglob('*.nzb'))
fileslist = []
for item in files:
if item.is_file():
fileslist.append(item)
print(fileslist)
for file in fileslist:
try:
with open(file, 'r', encoding='ansi') as f:
text = f.read()
with open(file, 'w', encoding='utf8') as f:
f.write(text)
except:
pass