Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom charset support for subtitles #5

Open
tp7 opened this issue Oct 29, 2014 · 3 comments
Open

Custom charset support for subtitles #5

tp7 opened this issue Oct 29, 2014 · 3 comments

Comments

@tp7
Copy link
Owner

tp7 commented Oct 29, 2014

Demux/open/write subtitles with user-specified charset.

Something like this should work for FFmpeg (cp1252 example):

args.extend(['-scodec', 'copy', '-sub_charenc', 'cp1252'])

And then use cp1252 while opening the file instead of utf-8-sig.

This might not be actually needed as subtitles in weird charsets seem to be quite rare.

@tophf
Copy link

tophf commented Oct 29, 2014

So here's some feedback.

  1. "Not needed" only for modern anime subtitles.
  2. cp1252 is/was a default charset for Western Europe so it's not "weird".

@tp7
Copy link
Owner Author

tp7 commented Oct 29, 2014

The ffmpeg demuxing issue is fixed in 1515e42.

Now we need to figure out how to correctly open subtitles in different codepages in Sushi without any user input.

@tp7 tp7 removed the on hold label Oct 29, 2014
@tophf
Copy link

tophf commented Oct 29, 2014

While the abovementioned commit is a sensible addition to Sushi it'll hardly be possible to correctly autodetect the encoding always (see this), although some (semi-?)solutions exist (chardet, UnicodeDammit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants