Comments (15)
@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.
Replace this line:
With:
subliminal.save_subtitles(video, self._download_item['subtitles'][video], self._download_item['single'], encoding='utf-8')
from auto-subliminal.
Do you only want this for UTF-8 only? Or do you want to give any possible encoding?
from auto-subliminal.
I think that UTF-8 should work well. In bazarr, I only encode in UTF-8.
from auto-subliminal.
personally just utf8 for me, but as your catering for all, i would guess all encoding types:)
btw, GREAT work!!!
from auto-subliminal.
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.
I've provided the option in the develop branch. Can you try it out and give feedback?
from auto-subliminal.
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.
I rather keep the original encoding as default. That's also how subliminal works by default ;)
from auto-subliminal.
Yes I understand. Of course, it’s up to you and you made Auto-Subliminal a very configurable software.
from auto-subliminal.
shall test the encoding for you, in a bit, just waiting on library updating.
from auto-subliminal.
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.
I can confirm utf8 encoding works 100000% :)
from auto-subliminal.
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.
@Zeusy123 have a good use case to test, I'll leave it to him.
from auto-subliminal.
Related Issues (20)
- Add support to pt-BR HOT 9
- webpage not loading HOT 2
- Addic7ed : loggin failed HOT 3
- Download forced subtitles from OpenSubtitles HOT 1
- Legendas.tv provider credentials HOT 8
- Blank home page when having titles with quotes HOT 8
- Using insecure websockets when sitting behind nginx reverse proxy HOT 7
- Auto-sub not opening webpage HOT 16
- Doesn't download because of login errors HOT 1
- Test anti-captcha providers HOT 1
- ValueError: ' fr' is not a valid language HOT 1
- [Request] creation of PID file so it can be monitored with Monit. HOT 1
- [Request] Make additional language as an option when Default language is missing HOT 5
- Action Required: Fix Renovate Configuration
- Dependency Dashboard
- opensubtitles SSL error HOT 4
- Call Diskscanner and SubChecker actions manually, without webgui HOT 1
- sqlite3.OperationalError: no such column: video_path for every file, scanning under windows HOT 4
- Can't save files HOT 4
- Search deadline should be configurable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-subliminal.