changeset 1357:0675e21d50ea trunk

[svn] - m3u file should be written in locale encoding.
author yaz
date Thu, 29 Jun 2006 00:38:22 -0700
parents e6cf73d27ea4
children 0c41255487ee
files ChangeLog audacious/playlist.c
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 28 19:24:02 2006 -0700
+++ b/ChangeLog	Thu Jun 29 00:38:22 2006 -0700
@@ -1,3 +1,12 @@
+2006-06-29 02:24:02 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1624]
+  - hookup tuple->formatter
+  
+
+  Changes:        Modified:
+  +1 -1           trunk/audacious/playlist.c  
+
+
 2006-06-29 02:06:06 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1622]
   - add tuple->formatter to tuplespace
--- a/audacious/playlist.c	Wed Jun 28 19:24:02 2006 -0700
+++ b/audacious/playlist.c	Thu Jun 29 00:38:22 2006 -0700
@@ -1285,6 +1285,7 @@
 playlist_save_m3u(FILE * file)
 {
     GList *node;
+    gchar *outstr = NULL;
 
     g_return_if_fail(file != NULL);
 
@@ -1304,7 +1305,14 @@
             else
                 seconds = -1;
 
-            g_fprintf(file, "#EXTINF:%d,%s\n", seconds, entry->title);
+            outstr = g_locale_from_utf8(entry->title, -1, NULL, NULL, NULL);
+            if(outstr) {
+                g_fprintf(file, "#EXTINF:%d,%s\n", seconds, outstr);
+                g_free(outstr);
+                outstr = NULL;
+            } else {
+                g_fprintf(file, "#EXTINF:%d,%s\n", seconds, entry->title);
+            }
         }
 
         g_fprintf(file, "%s\n", entry->filename);