Hi @"DaLanik" .
First impressions with the test version.
It worked. I was watching a TV show:
- pressed the download sub button
- chose the sub
- Kodi downloaded the sub using LegendasDivx addon
- finally I watched the OSD stating that it had cleaned the sub
The sub had nothing to be cleaned but as expected cleansub did it's thing and gave me a black background with a yellow font sub.
So it was a success.
Unfortunately, I came across an issue that I had already told you some months ago. The Portuguese language uses some special characters like these:
Ç ç
Á á É é Í í Ó ó Ú ú
À à
 â Ê ê Ô ô
à ã Õ õ
ª
º
There might be more but these are the usual.
With this test version of cleansubs, when the subs should show some of these characters instead of that it shows characters like ] or {.
I was thinking about it and I recall that I made some tests on my own a few months ago and I was able to manually replicate what cleansubs does when it adds the black background.
And if my memory serves me well, I had to download the subs and then convert their contents into UTF-8 before doing anything else and that way the subs didn't show any weird characters when it uses Portuguese language special characters.
I posted it here in the forums, so I will search for that and I will add it to this message when I find it.
But we're definitely getting there. So thanks a bunch for what you've done so far.
Cheers
EDIT: here it is,
the link to the topic where I talked about doing this manually.
Basically we're talking about making sure the download sub in UTF-8 and then use something like ffmpeg to convert from SRT into ASS.
In my case I would use a linux terminal command that would tell me what the file encoding(?) is:
If it returned anything other than UTF-8, like for instance iso8859-1, I would then convert the file to UTF-8 using:
Code:
iconv.exe -f iso-8859-1 -t utf-8 sub1.srt > sub1-utf8.srt
IIRC the remaining work of converting the sub to ASS/SSA would be accomplished by ffmpeg.
Could you look at your code and check if you're converting to UTF-8 prior to converting the sub into ASS/SSA?
Thanks a bunch.
Cheers