Git Product home page Git Product logo

Comments (15)

h3llrais3r avatar h3llrais3r commented on May 27, 2024 2

@Zeusy123 Thanks for the tip, but I'm only going to support utf-8 for now.
Adding a dropdown is a possibility, but I doubt there is a lot of request for alternative encodings.

from auto-subliminal.

morpheus65535 avatar morpheus65535 commented on May 27, 2024

Replace this line:

subliminal.save_subtitles(video, self._download_item['subtitles'][video], self._download_item['single'])

With:
subliminal.save_subtitles(video, self._download_item['subtitles'][video], self._download_item['single'], encoding='utf-8')

from auto-subliminal.

h3llrais3r avatar h3llrais3r commented on May 27, 2024

Do you only want this for UTF-8 only? Or do you want to give any possible encoding?

from auto-subliminal.

morpheus65535 avatar morpheus65535 commented on May 27, 2024

I think that UTF-8 should work well. In bazarr, I only encode in UTF-8.

from auto-subliminal.

Zeusy123 avatar Zeusy123 commented on May 27, 2024

personally just utf8 for me, but as your catering for all, i would guess all encoding types:)
btw, GREAT work!!!

from auto-subliminal.

h3llrais3r avatar h3llrais3r commented on May 27, 2024

I think I will start with an option to force utf-8. I can always change it later when there is need for it.

from auto-subliminal.

h3llrais3r avatar h3llrais3r commented on May 27, 2024

I've provided the option in the develop branch. Can you try it out and give feedback?

image

from auto-subliminal.

morpheus65535 avatar morpheus65535 commented on May 27, 2024

Question: is there a benefit of NOT storing them as utf8? I would put it as an option but as normal behavior. But it’s your choice! :-)

from auto-subliminal.

h3llrais3r avatar h3llrais3r commented on May 27, 2024

I rather keep the original encoding as default. That's also how subliminal works by default ;)

from auto-subliminal.

morpheus65535 avatar morpheus65535 commented on May 27, 2024

Yes I understand. Of course, it’s up to you and you made Auto-Subliminal a very configurable software.

from auto-subliminal.

Zeusy123 avatar Zeusy123 commented on May 27, 2024

shall test the encoding for you, in a bit, just waiting on library updating.

from auto-subliminal.

h3llrais3r avatar h3llrais3r commented on May 27, 2024

Yes I understand. Of course, it’s up to you and you made Auto-Subliminal a very configurable software

Thanks, I already spend lot of time on it. 😉
But even when it's not the default option, you can at least enable it now.
So please give it a try with latest develop branch.

from auto-subliminal.

Zeusy123 avatar Zeusy123 commented on May 27, 2024

I can confirm utf8 encoding works 100000% :)

from auto-subliminal.

Zeusy123 avatar Zeusy123 commented on May 27, 2024

Heres alternative for you to help:)

def get_subtitle_encoding(filename):

known_encodings = ["utf_8","cp1252","utf_16_le","utf_16_be","asci","iso8859_1","iso8859_2","iso8859_3","iso8859_4","iso8859_5","iso8859_6","iso8859_7","iso8859_8","iso8859_9","iso8859_10","iso8859_11","iso8859_13","iso8859_14","iso8859_15","iso8859_16","big5","big5hkscs","cp037","cp424","cp437","cp500","cp720","cp737","cp775","cp850","cp852","cp855","cp856","cp857","cp858","cp860","cp861","cp862","cp863","cp864","cp865","cp866","cp869","cp874","cp875","cp932","cp949","cp950","cp1006","cp1026","cp1140","cp1250","cp1251","cp1253","cp1254","cp1255","cp1256","cp1257","cp1258","euc_jp","euc_jis_2004","euc_jisx0213","euc_kr","gb2312","gbk","gb18030","hz","iso2022_jp","iso2022_jp_1","iso2022_jp_2","iso2022_jp_2004","iso2022_jp_3","iso2022_jp_ext","iso2022_kr","johab","koi8_r","koi8_u","mac_cyrillic","mac_greek","mac_iceland","mac_latin2","mac_roman","mac_turkish","ptcp154","shift_jis","shift_jis_2004","shift_jisx0213","utf_32","utf_32_be","utf_32_le","utf_16","utf_7","utf_8_sig"]
srt_encodings = ["UTF-8","cp1252","UTF-16LE","UTF-16BE","","ISO-8859-1","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","big5","big5hkscs","cp037","cp424","cp437","cp500","cp720","cp737","cp775","cp850","cp852","cp855","cp856","cp857","cp858","cp860","cp861","cp862","cp863","cp864","cp865","cp866","cp869","cp874","cp875","cp932","cp949","cp950","cp1006","cp1026","cp1140","cp1250","cp1251","cp1253","cp1254","cp1255","cp1256","cp1257","cp1258","euc_jp","euc_jis_2004","euc_jisx0213","euc_kr","gb2312","gbk","gb18030","hz","iso2022_jp","iso2022_jp_1","iso2022_jp_2","iso2022_jp_2004","iso2022_jp_3","iso2022_jp_ext","iso2022_kr","johab","koi8_r","koi8_u","mac_cyrillic","mac_greek","mac_iceland","mac_latin2","mac_roman","mac_turkish","ptcp154","shift_jis","shift_jis_2004","shift_jisx0213","utf_32","utf_32_be","utf_32_le","utf_16","utf_7","utf_8_sig"]

from auto-subliminal.

morpheus65535 avatar morpheus65535 commented on May 27, 2024

@Zeusy123 have a good use case to test, I'll leave it to him.

from auto-subliminal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.