Incorrect default language for COMM ID3v2 frame
Stephen F. Booth
me at sbooth.org
Tue Jan 22 08:39:30 CET 2008
Hello list,
I came across a strange problem and tracked it down to handling of
language-specific comment frames. The ID3v2.4.0 spec says, with
regards to language codes in text frames:
The three byte language field, present in several frames, is used to
describe the language of the frame's content, according to ISO-639-2
[ISO-639-2]. The language should be represented in lower case. If the
language is not known the string "XXX" should be used.
So I'm submitting the following patch:
Index: commentsframe.cpp
===================================================================
--- commentsframe.cpp (revision 764613)
+++ commentsframe.cpp (working copy)
@@ -154,7 +154,7 @@
ByteVector v;
v.append(char(d->textEncoding));
- v.append(d->language.size() == 3 ? d->language : " ");
+ v.append(d->language.size() == 3 ? d->language : "XXX");
v.append(d->description.data(d->textEncoding));
v.append(textDelimiter(d->textEncoding));
v.append(d->text.data(d->textEncoding));
Stephen
More information about the taglib-devel
mailing list