althought the current code accept via an argument the encoding of the subtitle I think it could be interesting if the program would be able to detect it automatically. I thought it could be done easily using the chardet library. Doing it also would require to use an external library so, include a requirements file (or put it in the setup.py)
I could try to find some while free to do it, but before do any PR I would like to discuss some specific details of the implementation, for example I thought a function that reads the raw input with chardet to detect the encoding and returning it with a fallback to utf-8 and implement it around line #155 in the utils.py.
what do you think?
althought the current code accept via an argument the encoding of the subtitle I think it could be interesting if the program would be able to detect it automatically. I thought it could be done easily using the chardet library. Doing it also would require to use an external library so, include a requirements file (or put it in the setup.py)
I could try to find some while free to do it, but before do any PR I would like to discuss some specific details of the implementation, for example I thought a function that reads the raw input with chardet to detect the encoding and returning it with a fallback to utf-8 and implement it around line #155 in the utils.py.
what do you think?