changeset 948:bd38580ec186 trunk

[svn] Experiment with catching invalid utf-8 so the dialog sees it, and it can be fixed properly in dialog.
author nemo
date Mon, 17 Apr 2006 12:19:04 -0700
parents 47642e4e456c
children 2b2f719d8cbb
files Plugins/Input/mpg123/fileinfo.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/fileinfo.c	Mon Apr 17 06:41:26 2006 -0700
+++ b/Plugins/Input/mpg123/fileinfo.c	Mon Apr 17 12:19:04 2006 -0700
@@ -304,10 +304,13 @@
   ID3Frame * frame = ID3Tag_FindFrameWithID(tag,frame_id);
   ID3Field * text_field;
   if (frame) {
+  	gchar *text;
     char buf[4096];
     text_field = ID3Frame_GetField(frame,ID3FN_TEXT);
     ID3Field_GetASCII(text_field,buf,4096);
-    gtk_entry_set_text(GTK_ENTRY(entry),buf);
+	text = str_to_utf8(buf);
+    gtk_entry_set_text(GTK_ENTRY(entry),text);
+	g_free(text);
   } else
     gtk_entry_set_text(GTK_ENTRY(entry),"");    
 }