When running subedit -c on Debian Linux, I got the following output:
Cleaning "Moviename.en.Adjusted.srt"
sed: -e expression #28, char 44: Invalid collation character
iconv: conversion stopped due to problem in writing the output: Broken pipe
/usr/local/bin/subedit: line 849: temp3arraysrt: bad array subscript
/usr/local/bin/subedit: line 855: temp3arraysrt: bad array subscript
/usr/local/bin/subedit: line 861: temp3arraysrt: bad array subscript
/usr/local/bin/subedit: line 867: temp3arraysrt: bad array subscript
/usr/local/bin/subedit: line 873: temp3arraysrt: bad array subscript
/usr/local/bin/subedit: line 879: temp3arraysrt: bad array subscript
/usr/local/bin/subedit: line 3904: temp1arraysrt: bad array subscript
/usr/local/bin/subedit: line 3905: unset: [-1]: bad array subscript
sed: -e expression #3, char 135: Invalid collation character
Due to the "problem in writing the output" line, the contents of the file were lost.
I suspected a problem with LC_COLLATE, which I have set to C.utf8. Running the command in the following way caused subedit to run without errors, so subedit should probably set its own LC variables internally:
LC_ALL=C subedit -c ...
I would additionally suggest that it's a safer strategy to have subedit write to a temporary file, then only overwrite the input file if the commands succeeded without error.
When running
subedit -con Debian Linux, I got the following output:Due to the "problem in writing the output" line, the contents of the file were lost.
I suspected a problem with
LC_COLLATE, which I have set toC.utf8. Running the command in the following way causedsubeditto run without errors, so subedit should probably set its own LC variables internally:LC_ALL=C subedit -c ...I would additionally suggest that it's a safer strategy to have subedit write to a temporary file, then only overwrite the input file if the commands succeeded without error.