helge79
30th December 2006, 14:15
It appears that I have just found a rather stupid bug with a few subtitle editors (Subtitle Workshop, Subtitle Processor... but the issue appears to be quite universal, so it may affect many other programs too). I am not sure if this is a good place to report the bug, but I couldn't think of any other...
So, imagine I have a MicroDVD (.sub) subtitle file in (Chinese) big5 encoding and want to convert it to SRT-format (the bug does not in principle depend on whether it is big5, and may affect some other encodings, too).
The rules of big5 encoding (and many other Asian language encodings) are such that, if a character with a numerical code in the range 128-255 is encountered, it is paired with the next character, and this two-character sequence is interpreted as a single hieroglyph (Chinese, in my case). So, for some hieroglyphs (as, for example, for the very common 會), the second ASCII-character in the encoding sequence will be "|".
Now, we all know that, in the MicroDVD format, "|" indicates a line break. So, it must be clear what goes wrong with the subtitle editors: they interpret the "|" appearing in the two-character sequence as a line break, and thus destroy a portion of the text. If you then try to save the file as SRT, all the |'s will be replaced by actual line breaks and the text will come out with quite a few blemishes.
So, if anyone here works on developing subtitle software, perhaps you could take these observations into account. (In my particular case, I found a relatively inconvenient and roundabout way to handle this issue, but it will probably be better if the future versions of the software are free of the bug...)
So, imagine I have a MicroDVD (.sub) subtitle file in (Chinese) big5 encoding and want to convert it to SRT-format (the bug does not in principle depend on whether it is big5, and may affect some other encodings, too).
The rules of big5 encoding (and many other Asian language encodings) are such that, if a character with a numerical code in the range 128-255 is encountered, it is paired with the next character, and this two-character sequence is interpreted as a single hieroglyph (Chinese, in my case). So, for some hieroglyphs (as, for example, for the very common 會), the second ASCII-character in the encoding sequence will be "|".
Now, we all know that, in the MicroDVD format, "|" indicates a line break. So, it must be clear what goes wrong with the subtitle editors: they interpret the "|" appearing in the two-character sequence as a line break, and thus destroy a portion of the text. If you then try to save the file as SRT, all the |'s will be replaced by actual line breaks and the text will come out with quite a few blemishes.
So, if anyone here works on developing subtitle software, perhaps you could take these observations into account. (In my particular case, I found a relatively inconvenient and roundabout way to handle this issue, but it will probably be better if the future versions of the software are free of the bug...)