# HG changeset patch # User nemo # Date 1145908191 25200 # Node ID bf06569fb0b49290b83d2ce0eabe824f2e037093 # Parent e42ce60c308fa1f5198d4323c45ee119c1255697 [svn] Quick n dirty unicode hack pending taglib-1.5. See http://bugs.kde.org/show_bug.cgi?id=126192 diff -r e42ce60c308f -r bf06569fb0b4 Plugins/Input/mpg123/Makefile.in --- a/Plugins/Input/mpg123/Makefile.in Mon Apr 24 12:46:47 2006 -0700 +++ b/Plugins/Input/mpg123/Makefile.in Mon Apr 24 12:49:51 2006 -0700 @@ -11,8 +11,10 @@ tabinit.c equalizer.c http.c \ dxhead.c decode.c dct64.c -OBJECTS = ${SOURCES:.c=.o} +OBJECTS = ${SOURCES:.c=.o} tag_c_hacked.o CFLAGS += -fPIC -DPIC $(GTK_CFLAGS) $(TAGLIB_CFLAGS) $(ARCH_DEFINES) -I../../../intl -I../../.. -LIBADD = -ltag_c $(GTK_LIBS) $(ID3LIBS) +CXXFLAGS = $(CFLAGS) + +LIBADD = -ltag_c $(GTK_LIBS) $(TAGLIB_LIBS) diff -r e42ce60c308f -r bf06569fb0b4 Plugins/Input/mpg123/fileinfo.c --- a/Plugins/Input/mpg123/fileinfo.c Mon Apr 24 12:46:47 2006 -0700 +++ b/Plugins/Input/mpg123/fileinfo.c Mon Apr 24 12:49:51 2006 -0700 @@ -22,6 +22,7 @@ #include "mpg123.h" #include +#include "tag_c_hacked.h" #include #include @@ -117,12 +118,15 @@ if (str_has_prefix_nocase(current_filename, "http://")) return; + taglib_set_strings_unicode(1); + taglib_file = taglib_file_new(current_filename); if(taglib_file) { taglib_tag = taglib_file_tag(taglib_file); taglib_ap = taglib_file_audioproperties(taglib_file); } else return; + taglib_set_id3v2_default_text_encoding(); taglib_tag_set_title(taglib_tag, gtk_entry_get_text(GTK_ENTRY(title_entry))); taglib_tag_set_artist(taglib_tag, gtk_entry_get_text(GTK_ENTRY(artist_entry))); taglib_tag_set_album(taglib_tag, gtk_entry_get_text(GTK_ENTRY(album_entry))); diff -r e42ce60c308f -r bf06569fb0b4 Plugins/Input/mpg123/tag_c_hacked.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/mpg123/tag_c_hacked.cpp Mon Apr 24 12:49:51 2006 -0700 @@ -0,0 +1,14 @@ +#include +#include + +extern "C" +{ +#include "tag_c_hacked.h" +} +using namespace TagLib; +using namespace ID3v2; +void taglib_set_id3v2_default_text_encoding() +{ + TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding(TagLib::String::UTF8); +} + diff -r e42ce60c308f -r bf06569fb0b4 Plugins/Input/mpg123/tag_c_hacked.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/mpg123/tag_c_hacked.h Mon Apr 24 12:49:51 2006 -0700 @@ -0,0 +1,11 @@ +#ifndef TAGLIB_TAG_C_HACKED +#define TAGLIB_TAG_C_HACKED + +#ifdef __cplusplus +extern "C" { +#endif +void taglib_set_id3v2_default_text_encoding(); +#ifdef __cplusplus +} +#endif +#endif