summaryrefslogtreecommitdiffstats
path: root/ext/taglib
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-07-05 10:14:16 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-07-05 10:14:16 +0000
commitb22fbf9f20d31b38991421f31d4ec143d9c5815f (patch)
tree5d38be2d4a54632aba0b72fb2e46c4af3f44a286 /ext/taglib
parent5f47b3d281e8208be553babe852ce72e7305fcd2 (diff)
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.
Diffstat (limited to 'ext/taglib')
-rw-r--r--ext/taglib/gstid3v2mux.cc4
1 files changed, 4 insertions, 0 deletions
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);