Skip to content

Automatic detection of encoding #67

@alex-left

Description

@alex-left

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions