# HG changeset patch # User henry # Date 1043779558 0 # Node ID ab8238290141188132e93d1739b115be57afe36e # Parent d33fe13de7ae4b7ee915ccc87a0933ee757575c9 sub_utf8 handling hopefully fixed diff -r d33fe13de7ae -r ab8238290141 subreader.c --- a/subreader.c Tue Jan 28 18:38:26 2003 +0000 +++ b/subreader.c Tue Jan 28 18:45:58 2003 +0000 @@ -923,7 +923,6 @@ if (sub_cp){ if ((icdsc = iconv_open (tocp, sub_cp)) != (iconv_t)(-1)){ mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: opened iconv descriptor.\n"); - sub_utf8_prev=sub_utf8; sub_utf8 = 2; } else mp_msg(MSGT_SUBREADER,MSGL_ERR,"SUB: error opening iconv descriptor.\n"); @@ -935,7 +934,6 @@ if (icdsc != (iconv_t)(-1)){ (void) iconv_close (icdsc); icdsc = (iconv_t)(-1); - sub_utf8=sub_utf8_prev; mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: closed iconv descriptor.\n"); } } @@ -1100,6 +1098,7 @@ rewind (fd); #ifdef USE_ICONV + sub_utf8_prev=sub_utf8; subcp_open(); #endif @@ -1131,6 +1130,7 @@ { #ifdef USE_ICONV subcp_close(); + sub_utf8=sub_utf8_prev; #endif if ( first ) free(first); return NULL;