[MPlayer-dev-eng] [PATCH] subreader: recode the whole file to utf-8 before parsing

Evgeniy Stepanov eugeni.stepanov at gmail.com
Tue May 29 01:46:03 CEST 2007


Hi,

this patch changes the way subtitle recoding takes place. Instead of recoding 
each 'struct subtitle', the whole file is read into memory, recoded to utf-8, 
and a stream is created with new_memory_stream.

This patch was created as an attempt to resolve the problem with BOM in the 
beginning of a unicode subtitle file. The problem is not solved yet, but it 
is easy now, and will be done in a separate patch. As a side effect, which is 
arguably more important, it allows to read UTF-16 encoded subtitles.

Subtitle related code at the beginning of subreader.c is unused now and can be 
removed.

All in all, it seems like the right thing to do. Opinions ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subreader-memory.patch
Type: text/x-diff
Size: 4379 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070529/9e8dea2b/attachment.patch>


More information about the MPlayer-dev-eng mailing list