diff --git a/configure.in b/configure.in index 66ecd0a2..1adbfbbc 100644 --- a/configure.in +++ b/configure.in @@ -52,12 +52,14 @@ dnl ======================= dnl = checking for taglib = dnl ======================= if test "$taglib" = "yes" ; then - PKG_CHECK_MODULES([taglib], taglib >= 1.5, , AC_MSG_ERROR([TagLib >= 1.5 is required])) - AC_SUBST(taglib_LIBS) - AC_SUBST(taglib_CFLAGS) - CPPFLAGS="$CPPFLAGS $taglib_CFLAGS" - LDFLAGS="$LDFLAGS $taglib_LIBS" - AC_CHECK_HEADERS([taglib.h], , AC_MSG_ERROR([missing taglib.h header])) + AC_PATH_PROG(TAGLIB_CONFIG, taglib-config) + if test "$TAGLIB_CONFIG" != "" ; then + CPPFLAGS="$CPPFLAGS `$TAGLIB_CONFIG --cflags`" + LDFLAGS="$LDFLAGS `$TAGLIB_CONFIG --libs`" + AC_CHECK_HEADERS([taglib.h], , AC_MSG_ERROR([missing taglib.h header])) + else + AC_MSG_ERROR([taglib-config executable is missing]) + fi fi AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile]) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index 26d510fb..d999a9d9 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -159,12 +159,13 @@ bool WriteTags(Song &s) { MPEG::File file(path_to_file.c_str()); ID3v2::Tag *tag = file.ID3v2Tag(); + String::Type encoding = UNICODE ? String::UTF8 : String::Latin1; ByteVector Composer("TCOM"); ByteVector Performer("TOPE"); ByteVector Disc("TPOS"); - ID3v2::Frame *ComposerFrame = new ID3v2::TextIdentificationFrame(Composer); - ID3v2::Frame *PerformerFrame = new ID3v2::TextIdentificationFrame(Performer); - ID3v2::Frame *DiscFrame = new ID3v2::TextIdentificationFrame(Disc); + ID3v2::Frame *ComposerFrame = new ID3v2::TextIdentificationFrame(Composer, encoding); + ID3v2::Frame *PerformerFrame = new ID3v2::TextIdentificationFrame(Performer, encoding); + ID3v2::Frame *DiscFrame = new ID3v2::TextIdentificationFrame(Disc, encoding); ComposerFrame->setText(TO_WSTRING(s.GetComposer())); PerformerFrame->setText(TO_WSTRING(s.GetPerformer())); DiscFrame->setText(TO_WSTRING(s.GetDisc()));