Mercurial > audlegacy
diff Plugins/Input/mpg123/fileinfo.c @ 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 | 9bc585cc3c65 |
children | 12f57026da8f |
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),""); }