<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 27.01.2010, at 14:55, patrick machielse wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Op 27 jan 2010, om 07:04 heeft Dudy Kohen het volgende geschreven:<br><br><blockquote type="cite">On Tue, Jan 26, 2010 at 11:42 PM, patrick machielse &lt;<a href="mailto:patrick@hieper.nl">patrick@hieper.nl</a>&gt; wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">It turns out that new comment frames by default do not have a language set, and TagLib writes out 'XXX'<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">in place of the 3-character language code:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">// &nbsp;commentsframe.cpp<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">ByteVector CommentsFrame::renderFields() const<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">{<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;//...<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;v.append(d-&gt;language.size() == 3 ? d-&gt;language : "XXX");<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">The ID3V2.4 spec says it should be an ISO 639-2 code. "XXX" isn't valid.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Is this a bug in TagLib? I can't find a response to my original message in the list archives.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is the standard when the language is not defined or invalid.<br></blockquote><blockquote type="cite">It's not correct to set a default language in a library, so you should set the language before writing.<br></blockquote><br>Alright, <br><br>" &nbsp;The three byte language field, present in several frames, is used to<br> &nbsp;&nbsp;describe the language of the frame's content, according to ISO-639-2<br> &nbsp;&nbsp;[ISO-639-2]. The language should be represented in lower case. If the<br> &nbsp;&nbsp;language is not known the string "XXX" should be used."<br><br>This seems to me a contradictory part of the specification, since ISO-639-2 defines a code for "undetermined language" as well ('und') and using XXX is not complient with ISO-639-2.<br><br>'should be used' suggests that this requirement has the nature of a recommendation. TagLib possibly could write out zeroes for better interoperability without violating the v2.4 specification proper. If that is not appropriate, I want to suggest implementing a default value of zeroes (if that works) or 'eng' as part of the TagLib "iTunes Hacks".<br><br>Thanks,<br>patrick</div></blockquote><br></div><div>I had the same problems with iTunes. I just changed the default language to eng. What I've seen this is what iTunes does.</div><div>But what did you do to filter out the iTunes specific comments? I just check them manually. I'm not so into C++ so is there an easier way to do the following?</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(85, 129, 134); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>FrameList<span style="color: #000000">::</span>ConstIterator<span style="color: #000000"> </span>it<span style="color: #000000"> = comments.</span>end<span style="color: #000000">();</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">        </span>--<span style="color: #558186">it</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b513a1">while</span> (<span style="color: #558186">it</span> != comments.<span style="color: #558186">end</span>()){</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(85, 129, 134); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                </span></span>CommentsFrame<span style="color: #000000"> *</span>frame<span style="color: #000000"> = </span><span style="color: #b513a1">dynamic_cast</span><span style="color: #000000">&lt;</span>CommentsFrame<span style="color: #000000"> *&gt;(*</span>it<span style="color: #000000">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: #b513a1">if</span> (!(<span style="color: #558186">frame</span>-&gt;<span style="color: #36595d">description</span>() == <span style="color: #558186">String</span>(<span style="color: #c92925">"iTunNORM"</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>&amp;&amp; !(<span style="color: #558186">frame</span>-&gt;<span style="color: #36595d">description</span>() == <span style="color: #558186">String</span>(<span style="color: #c92925">"iTunSMPB"</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>&amp;&amp; !(<span style="color: #558186">frame</span>-&gt;<span style="color: #36595d">description</span>() == <span style="color: #558186">String</span>(<span style="color: #c92925">"iTunPGAP"</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>&amp;&amp; !(<span style="color: #558186">frame</span>-&gt;<span style="color: #36595d">description</span>() == <span style="color: #558186">String</span>(<span style="color: #c92925">"iTunes_CDDB_1"</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>&amp;&amp; !(<span style="color: #558186">frame</span>-&gt;<span style="color: #36595d">description</span>() == <span style="color: #558186">String</span>(<span style="color: #c92925">"iTunes_CDDB_IDs"</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(201, 41, 37); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                        </span>&amp;&amp; !(</span><span style="color: #558186">frame</span><span style="color: #000000">-&gt;</span><span style="color: #36595d">description</span><span style="color: #000000">() == </span><span style="color: #558186">String</span><span style="color: #000000">(</span>"iTunes_CDDB_TrackNumber"<span style="color: #000000">))) {</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span><span style="color: #b513a1">return</span> (*<span style="color: #558186">it</span>)-&gt;<span style="color: #36595d">toString</span>();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(22, 135, 17); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                </span>--</span><span style="color: #558186">it</span><span style="color: #000000">; </span>//revers enumerate</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(85, 129, 134); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="color: #b513a1">return</span><span style="color: #000000"> </span>String<span style="color: #000000">::</span>null<span style="color: #000000">;</span></div></div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-size: 12px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thomas Post</div><div>-----------------------------------------------------------------------------------------------------------</div><div><br></div><div>equinux Aktiengesellschaft</div><div>Informationstechnologien</div><div>Kirschstraße 35</div><div>80999 München - Germany</div><div>Tel. +49-89-520465-339</div><div>Fax +49-89-520465-299</div><div><a href="mailto:post@equinux.de">mailto:post@equinux.de</a></div><div><a href="http://www.equinux.com/de">http://www.equinux.com/de</a></div><div>-----------------------------------------------------------------------------------------------------------</div><div>Vorstand: Till Schadde &nbsp;-&nbsp; Aufsichtsrat: Stefan Neuenhahn</div><div>USt-IdNr.: DE206360115&nbsp; -&nbsp; Sitz München&nbsp; -&nbsp; HRB München 129700</div><div>-----------------------------------------------------------------------------------------------------------</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">equinux USA, Inc.</div><div>100 Produce Ave. Suite L,&nbsp;South San Francisco, CA 94080&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Toll free: 1-888-equinux (1-888-3784689)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.equinux.com/">http://www.equinux.com</a></div><div>-----------------------------------------------------------------------------------------------------------</div><div><br class="khtml-block-placeholder"></div></span>Stay updated what's going on at equinux<br><a href="http://blog.equinux.com/">equinux Blog</a>&nbsp;|&nbsp;<a href="http://www.twitter.com/equinux">equinux @ Twitter</a>&nbsp;|&nbsp;<a href="http://www.facebook.com/pages/equinux/43701393352">equinux @ Facebook</a></div></body></html>