[vlc-devel] [PATCH] subsdec: check UTF-8 autodetection all the time

KO Myung-Hun komh78 at gmail.com
Tue Oct 16 14:10:18 CEST 2012



KO Myung-Hun wrote:
> This is useful for the case that there are both the subtitles in UTF-8 and
> ones in NLS.
> ---
>  modules/codec/subsdec.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
> index 118e901..89c048a 100644
> --- a/modules/codec/subsdec.c
> +++ b/modules/codec/subsdec.c
> @@ -277,7 +277,7 @@ static int OpenDecoder( vlc_object_t *p_this )
>              encoding = var;
>      }
>      else
> -    /* Third, try "local" encoding with optional UTF-8 autodetection */
> +    /* Third, try "local" encoding */
>      {
>          /* xgettext:
>             The Windows ANSI code page most commonly used for this language.
> @@ -291,11 +291,13 @@ static int OpenDecoder( vlc_object_t *p_this )
>             the VideoLAN translators mailing list. */
>          encoding = vlc_pgettext("GetACP", "CP1252");
>          msg_Dbg (p_dec, "trying default character encoding: %s", encoding);
> -        if (var_InheritBool (p_dec, "subsdec-autodetect-utf8"))
> -        {
> -            msg_Dbg (p_dec, "using automatic UTF-8 detection");
> -            p_sys->b_autodetect_utf8 = true;
> -        }
> +    }
> +
> +    /* Check UTF-8 autodetection */
> +    if (var_InheritBool (p_dec, "subsdec-autodetect-utf8"))
> +    {
> +        msg_Dbg (p_dec, "using automatic UTF-8 detection");
> +        p_sys->b_autodetect_utf8 = true;
>      }
>  
>      if (strcasecmp (encoding, "UTF-8") && strcasecmp (encoding, "utf8"))

Ping ?

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.18 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr




More information about the vlc-devel mailing list