summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-21 12:09:39 +0000
committeratlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-21 12:09:39 +0000
commitca34fb6b740de4b5fc844240fafb5086278d7f2f (patch)
treeca312d92425a204713caa257558e3219631e931b
parent9402d2456abe4bda28dccf4a0fbde401f959f5d7 (diff)
downloadmpv-ca34fb6b740de4b5fc844240fafb5086278d7f2f.tar.bz2
mpv-ca34fb6b740de4b5fc844240fafb5086278d7f2f.tar.xz
if option -sub filename.utf then switch sub_utf8 on
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1605 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/SUB+OSD9
-rw-r--r--mplayer.c4
2 files changed, 12 insertions, 1 deletions
diff --git a/DOCS/SUB+OSD b/DOCS/SUB+OSD
index ab60f70dc3..ac1311b266 100644
--- a/DOCS/SUB+OSD
+++ b/DOCS/SUB+OSD
@@ -25,7 +25,14 @@ There are many ways to get it:
Note: currently available fonts are only for limited iso 8859-1/2 support,
and there is a few special version for korean, russian etc codepages.
You'd better building font yourself with tool mentioned above.
-
+ Font should have appropriate font.desc file which maps unicode font
+ positions to the actual code page of the subtitles text. Other solution
+ is to have subtitles encoded in utf8 encoding and use -utf8 option
+ or just name the subtitles file <video_name>.utf and have it in the same
+ dir as the video file. Recoding from different codepages to utf8 could be
+ done by using konwert (debian) or iconv (RedHat) programs.
+
+
some usefull URLs:
ftp://ftp.mplayerhq.hu/MPlayer/releases/ - ISO fonts, OBSOLETED!
ftp://ftp.mplayerhq.hu/MPlayer/contrib/fonts/ - various fonts by users
diff --git a/mplayer.c b/mplayer.c
index b7b31dd230..194fbe8291 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -589,6 +589,10 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
#ifdef USE_SUB
// check .sub
if(sub_name){
+ int l=strlen(sub_name);
+ if ((l>4) && ((0==strcmp(&sub_name[l-4],".utf"))
+ ||(0==strcmp(&sub_name[l-4],".UTF"))))
+ sub_utf8=1;
subtitles=sub_read_file(sub_name);
if(!subtitles) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name);
} else {