Page 1 of 1

Thai Sub Title problem

Posted: 08 Sep 2009 17:04
by Gegs
Hi...am new to this forum and site...please help or point me in the right direction

I am running VLC on OS 10.5.8 (same problem occurs on Quicktime)

I am familiar with Subtitle .ssa and .srt files and can run them fine. However, whenever I download a Thai subtitle file and play it, I do not get Thai letters...I get strange characters. If I look at the file through the Mac text editor, the english file is fine but the Thai subtitle file has these same strange characters that show during movie playback

For example, James Bond Quantum of Solace .ssa sub file looks like this

English
[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: Marked=0,0:03:40.39,0:03:44.81,Default,,0000,0000,0000,,Siena, Italy.
Dialogue: Marked=0,0:04:06.84,0:04:08.59,Default,,0000,0000,0000,,It's time to get out.
Dialogue: Marked=0,0:07:37.13,0:07:39.05,Default,,0000,0000,0000,,Don't bleed to death.

Thai
[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: Marked=0,0:03:40.39,0:03:44.81,Default,,0000,0000,0000,,‡´’¬πË“, Õ‘µ“≈’
Dialogue: Marked=0,0:04:06.84,0:04:08.59,Default,,0000,0000,0000,,‰¥È‡«≈“ÕÕ°¡“·≈È«
Dialogue: Marked=0,0:07:37.13,0:07:39.05,Default,,0000,0000,0000,,լ˓„Àȇ≈◊Õ¥ÕÕ°®πµ“¬À≈Ë–

FYI...I have, of course, enabled Thai fonts on the MAC and can see and type Thai charactors

Any and all help appreciated!!!
Gegs

Re: Thai Sub Title problem

Posted: 08 Sep 2009 17:39
by ajmas
It may be an encoding issue. Could you make the subtitle files available, so that I could download it and see for myself?

Re: Thai Sub Title problem

Posted: 04 Nov 2009 21:04
by Beast Of Bodmin
I too have this problem.

There is an example set of subtitles under this link. It is for the movie Madagascar 2.

http://www.thaisubtitle.com/manage/down ... 239&lng=th

I think the problem is in the encoding of the file. When loaded into any text editor or jubler, or played with VLC, the subtitle in the link above looks like the OP's do.

Just now, I used jubler to create a dummy subtitle file, set the keyboard to Thai-PattaChote, and typed in some random Thai characters. I saved the file as a .ssa and played back the movie. My fake subtitles showed up as Thai characters.

So I am guessing the trick is to discover how to convert the files. Assuming they are not corrupted.

Re: Thai Sub Title problem

Posted: 04 Nov 2009 23:29
by ajmas
Try opening the file in Firefox, or another browser, and play with the character encoding until it renders properly. Copy the text. Then in Text Wrangler (free download), or another equivalent text editor, paste the copied text. Save the file as UTF-8, using the original name of the file (back-up the original one first) and then use that file for the subtitles.

There is probably another way, but off the top of my head and not being in front of my Mac, this should do the job.

Re: Thai Sub Title problem

Posted: 05 Nov 2009 22:32
by Beast Of Bodmin
Your BFI suggestion was of course what I should have tried in the first place :D . Just lazy I suppose.

I ended up using TextEdit to fix the encoding. I opened using Thai (ISO 8859-11) and saved as Unicode (UTF-8)

Textwrangler only showed me a subset of encodings.

Thanks very much for the help.

Re: Thai Sub Title problem

Posted: 11 Nov 2009 14:41
by Gegs
I also found this answer from someone at ThaiSubitles.com

The following was sent to me "dosboy" via PM

Hey. I tried replying to your thread but for some reason the board won't let me post. At any rate, check out the solution on my blog at http://dosboy.ca/2009/11/thai-subtitles-on-mac-osx.html. If it works for you, feel free to post it as a follow-up to your thread (I have no idea why it won't let me post ... just get some message in Thai ต้องขออภัยในความไม่สะดวกครับ ที่ไม่สามารถโพสได้ กรุณาติดต่อ which Google translates as "Apologize for the inconvenience ครับ. That can not be posted please.")

After following the links, this worked perfectly. It also works on VLC....yeah!!

Many thanks "dosboy"!!!

Re: Thai Sub Title problem

Posted: 23 Jan 2011 21:28
by dosboy
Hey guys. I created a tool to do this conversion online and avoid command-line intricacies. Feel free to use it as much as you like.

http://grinninggecko.com/labs/thai-subtitle-converter/

Re: Thai Sub Title problem

Posted: 09 Nov 2012 22:15
by Beast Of Bodmin
This evening I rediscovered this post, went through some pain and eventually I discovered the Mac OS X iconv utilty.

Code: Select all

iconv -f ISO_8859-11 -t UTF-8 foo >foo.utf-8