Kodi Community Forum

Full Version: Subtitles stop after "strange" characters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Something -really- irritating is happening to my subtitles consequently.. After a while, subtitles stop working suddenly.. After a few times, i found out that the subtitles from a certain movie always stop at the same moment. After some more investigation, i found out that maybe a special character in the relevant subtitle could be the reason. For example the subtitle of Limitless stopped here:

Met mijn eigen assistent.^M
Ongelooflijk, hè?^M

It only showed "Ongelooflijk, h" and then they stopped. After removing the "Ã" the subs worked from that point on (until the next strange character). Looks like an undocumented feature (read: bug)? Anybody else got this? And maybe some1 got a solution for this? Oo
When i give the subtitle the following treatment:

tr -cd '\11\12\40-\176' < $INPUT_FILE > $OUTPUT_FILE

It works.. However, many (all?) subtitles have somekind of special character and some belong there..
Sounds like it's encoded incorrectly. Check the text encoding of the file.
jmarshall Wrote:Sounds like it's encoded incorrectly. Check the text encoding of the file.

But this happens wit a -lot- (if not all) of subtitles downloaded with the subtitle script. By the way, this is the encoding of the subtitle:

Code:
Limitless.nl.srt: ISO-8859 English text, with CRLF line terminators
XBMC uses UTF-8 for any text i/o. If the top bit of a character is set it might be causing XBMC to attempt a UTF-8 translation, which would obviously mangle ISO-8859 characters.

JR
jhsrennie Wrote:XBMC uses UTF-8 for any text i/o. If the top bit of a character is set it might be causing XBMC to attempt a UTF-8 translation, which would obviously mangle ISO-8859 characters.

JR

Hmmm.. That would mean that a great deal of subtitles on the net are not ok.. Also, i could live with some mangled characters, however, they just stop working after a special character.. Workaround for now is to run a script every night which strips the special characters of all subtitles in my movie/series directory, but that is actualy a crappy workaround because I cannot load subtitles realtime now Sad
What do you have your subtitle charset set to?
jmarshall Wrote:What do you have your subtitle charset set to?

Good point - in System settings, Video, Subtitles there's a "Character set" setting, and one of the options is "Western Europe (ISO)".

JR
Uhm.. Eeehh.. I feel kinda very ashamed right now.. Of-course setting the Character set was the solution. Thinking back, my Korean niece stayed here a while, and to facilitate korean subtitles i set the character set to Korean and -totaly- forgot about that.. Thank god there are smart people around to point me in the right direction..

Thanks! And very sorry for wasting your time.. I've been a XBMC user since the very beginning and I do appreciate all your efforts very much. Also thanks for that!!