vlc/vlc-2.0 | branch: master | Ludovic Fauvet <[email protected]> | Wed Aug 28 17:27:12 2013 +0200| [31ee582b7a87c71205d4b123dce63a8c54c9033f] | committer: Felix Paul Kühne
cue: support Latin1 cue files (fix #9238) (cherry picked from commit 3e43d99c32e4367dcd1908551c1a4f50bb2dbccd) Signed-off-by: Felix Paul Kühne <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=31ee582b7a87c71205d4b123dce63a8c54c9033f --- share/lua/playlist/cue.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/lua/playlist/cue.lua b/share/lua/playlist/cue.lua index df0aefc..bb63e11 100644 --- a/share/lua/playlist/cue.lua +++ b/share/lua/playlist/cue.lua @@ -34,7 +34,15 @@ function probe() end -- Helpers +function is_utf8( src ) + return vlc.strings.from_charset( "UTF-8", src ) == src +end + function cue_string( src ) + if not is_utf8( src ) then + -- Convert to UTF-8 since it's probably Latin1 + src = vlc.strings.from_charset( "ISO_8859-1", src ) + end local sub = string.match( src, "^\"(.*)\".*$" ); if( sub ) then return sub _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
