From d26e09926e2d0be97a5137971226a6986420db00 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Wed, 30 Jan 2008 12:47:03 +0000 Subject: [PATCH] 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 --- taglib/mpeg/id3v1/id3v1tag.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); }