[MPlayer-cvslog] r37912 - trunk/gui/util/misc.c

ib subversion at mplayerhq.hu
Tue Jan 10 07:07:01 EET 2017


Author: ib
Date: Tue Jan 10 07:07:01 2017
New Revision: 37912

Log:
Expect file name and path to be UTF-8 encoded in cue sheet playlists.

The cue sheet specification doesn't mention any character encoding
(besides ASCII) for filename, performer, title and such, which clearly
doesn't fulfill today's needs.

Even without any guideline, it seems reasonable to expect UTF-8 encoding
these days.

(The GUI is already handling all the other UTF-8 strings in cue sheet
playlists correctly.)

Modified:
   trunk/gui/util/misc.c

Modified: trunk/gui/util/misc.c
==============================================================================
--- trunk/gui/util/misc.c	Tue Jan 10 06:15:36 2017	(r37911)
+++ trunk/gui/util/misc.c	Tue Jan 10 07:07:01 2017	(r37912)
@@ -30,6 +30,9 @@
 #include "string.h"
 #include "gui/app/gui.h"
 
+#define CFG_OLD_PLAYLIST
+#include "gui/app/cfg-old.c"
+
 #include "mp_msg.h"
 
 /**
@@ -170,8 +173,8 @@ plItem **cue_playlist(const char *fname)
             if (!item[i])
                 break;
 
-            item[i]->path = strdup(path);
-            item[i]->name = strdup(data);
+            item[i]->path = strdup(cfg_old_filename_from_utf8(path));
+            item[i]->name = strdup(cfg_old_filename_from_utf8(data));
 
             isTRACK = True;
         } else if (strncmp(l, "TITLE ", 6) == 0) {


More information about the MPlayer-cvslog mailing list