From: Scott Wheeler Date: Wed, 30 Jan 2008 12:47:03 +0000 (+0000) Subject: Don't try to write non-Latin1 values to ID3v1 tags since they'll ugly things will X-Git-Tag: v1.5~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d26e09926e2d0be97a5137971226a6986420db00;p=taglib Don't try to write non-Latin1 values to ID3v1 tags since they'll ugly things will happen when some of the characters are null. This behavior can still be customized via the StringHandler. CCBUG:99149 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@768597 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- diff --git a/taglib/mpeg/id3v1/id3v1tag.cpp b/taglib/mpeg/id3v1/id3v1tag.cpp index 0b8d1287..49162e5c 100644 --- a/taglib/mpeg/id3v1/id3v1tag.cpp +++ b/taglib/mpeg/id3v1/id3v1tag.cpp @@ -64,6 +64,11 @@ String ID3v1::StringHandler::parse(const ByteVector &data) const ByteVector ID3v1::StringHandler::render(const String &s) const { + if(!s.isLatin1()) + { + return ByteVector(); + } + return s.data(String::Latin1); }