From b22fbf9f20d31b38991421f31d4ec143d9c5815f Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Wed, 5 Jul 2006 10:14:16 +0000 Subject: ext/taglib/gstid3v2mux.cc: Make UTF-8 the default encoding when writing string tags (before, our UTF-8 strings would ... Original commit message from CVS: * ext/taglib/gstid3v2mux.cc: Make UTF-8 the default encoding when writing string tags (before, our UTF-8 strings would automatically be converted to ISO-8859-1 by taglib and written as ISO-8859-1 fields if that was possible). * tests/check/elements/id3v2mux.c: (utf8_string_in_buf), (test_taglib_id3mux_check_tag_buffer), (identity_cb), (test_taglib_id3mux_with_tags): Add test case that makes sure our UTF-8 strings have actually been written into the tag as UTF-8. --- ext/taglib/gstid3v2mux.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/taglib') diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc index 0a40d9e4..2f75b669 100644 --- a/ext/taglib/gstid3v2mux.cc +++ b/ext/taglib/gstid3v2mux.cc @@ -408,6 +408,10 @@ gst_id3v2_mux_render_tag (GstTagLibMux * mux, GstTagList * taglist) GstBuffer *buf; guint tag_size; + /* write all strings as UTF-8 by default */ + TagLib::ID3v2::FrameFactory::instance ()-> + setDefaultTextEncoding (TagLib::String::UTF8); + /* Render the tag */ gst_tag_list_foreach (taglist, add_one_tag, &id3v2tag); -- cgit