Bug 141678 - Trailing spaces in ID3v1 tags
Summary: Trailing spaces in ID3v1 tags
Alias: None
Product: taglib
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Scott Wheeler
Depends on:
Reported: 2007-02-14 13:56 UTC by Xavier Duret
Modified: 2007-04-01 22:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:

ID3v1 trailing spaces fix (512 bytes, patch)
2007-02-14 13:57 UTC, Xavier Duret

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Duret 2007-02-14 13:56:19 UTC
Version:           svn 633141 (using KDE Devel)
Installed from:    Compiled sources

It seams that there is at least one quite popular encoder that generate ID3v1
frames with trailing spaces instead of using NULL terminated strings.
Comment 1 Xavier Duret 2007-02-14 13:57:37 UTC
Created attachment 19684 [details]
ID3v1 trailing spaces fix

This is a trivial patch and do not break binary compatibility.
Comment 2 Scott Wheeler 2007-04-01 22:32:17 UTC
SVN commit 648986 by wheeler:

Strip whitespaces from the end of ID3v1 fields on the way into TagLib.


 M  +1 -1      id3v1tag.cpp  

--- trunk/kdesupport/taglib/taglib/mpeg/id3v1/id3v1tag.cpp #648985:648986
@@ -55,7 +55,7 @@
 String ID3v1::StringHandler::parse(const ByteVector &data) const
-  return String(data, String::Latin1);
+  return String(data, String::Latin1).stripWhiteSpace();
 ByteVector ID3v1::StringHandler::render(const String &s) const