changeset 1604:c817a44598cd

if option -sub filename.utf then switch sub_utf8 on
author atlka
date Tue, 21 Aug 2001 12:09:39 +0000
parents f5587a8ce315
children cf1390a2cad7
files DOCS/SUB+OSD mplayer.c
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/SUB+OSD	Tue Aug 21 11:49:27 2001 +0000
+++ b/DOCS/SUB+OSD	Tue Aug 21 12:09:39 2001 +0000
@@ -25,7 +25,14 @@
    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
--- a/mplayer.c	Tue Aug 21 11:49:27 2001 +0000
+++ b/mplayer.c	Tue Aug 21 12:09:39 2001 +0000
@@ -589,6 +589,10 @@
 #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 {