[MPlayer-dev-eng] [PATCH] Libass BOM fix
Ulion
ulion2002 at gmail.com
Sat Oct 27 15:26:11 CEST 2007
2007/10/27, Ulion <ulion2002 at gmail.com>:
> 2007/10/27, Evgeniy Stepanov <eugeni.stepanov at gmail.com>:
> >
> > The attached file works fine here, because it is LE and my machine is also LE.
> > However, UCS-2BE files indeed cannot be opened without explicit -subcp. The
> > problem is, enca detects file encoding as simply 'UCS-2', and iconv does not
> > pay attention to BOM.
> >
> > In fact, enca is able to detect the endianness of unicode files, even without
> > a BOM sometimes. This information is available via EncaSurface. It seems a
> > good idea to use it, and only do manual detection when not using enca.
>
> I did not known enca, will have a try. Even enca did part work for us,
> in my machine (powerpc G5), I think this ass file will still not work
> since my machine byte-order is big-endian.
>
I tested enca 1.9 with iconv 2.4, it can convert correctly with either
utf-16le or utf-16be encoded ass with BOM. So enca can do that work,
but for situations enca not enabled or not set as subcp, shall we use
BOM detection as a fallback for utf-16 files?
--
Ulion
More information about the MPlayer-dev-eng
mailing list