<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>I am trying to get the comment from MP3s using taglib_tag_comment "tag_c.h".  Everything works fine if there is a comment in the MP3 but if the comment field is empty I get the results from the OUTPUT section below.</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>I have included the relevant code, basically a stripped down tagreader_c.c found in examples.  I would expect that instead of the values I am getting I would be getting the empty string, or maybe NULL, but that does not seem to be the case.  taglib_tag_album, taglib_tag_artist etc. all seem to be working properly and return an empty string if there is nothing there.</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>I have looked at the documentation online and it seems that the C++ version of this function returns String::NULL, so perhaps that has something to do with what is going on?  I am not an expert at C++ and I am having difficulty figuring out what is going on.</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>If someone could explain what is going on, or tell me what I am doing wrong I would appreciate it.</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>Thank you,</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>- Andrew</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>CODE</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b>function() {</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="white-space: pre;"><b><br></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"><b></b></span><b>taglib_set_strings_unicode(TRUE);</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b></b><b>taglib_id3v2_set_default_text_encoding(TagLib_ID3v2_UTF8);</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b></b><b>TagLib_File&nbsp;*file =&nbsp;taglib_file_new(filename);</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b></b><b>if(file !=&nbsp;NULL) {<span class="Apple-style-span" style="white-space: pre; ">                        </span></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"><b></b></span><b><span class="Apple-tab-span" style="white-space:pre">        </span>TagLib_Tag&nbsp;*tag =&nbsp;taglib_file_tag(file);</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b></b><b><span class="Apple-tab-span" style="white-space:pre">        </span>properties =&nbsp;taglib_file_audioproperties(file);</b><span class="Apple-tab-span" style="white-space:pre"><b>                                </b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"><b><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-tab-span" style="white-space:pre">        </span>printf("comment: %s\n",&nbsp;taglib_tag_comment(tag));</span></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"><b><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-tab-span" style="white-space:pre">        </span>taglib_tag_free_strings();</span></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"><b><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-tab-span" style="white-space:pre">        </span>taglib_file_free(file);</span></b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>}</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>}</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>OUTPUT (from calling the function on 11 different MP3s)</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00000E3A 00000EB1 00007652 00007670 0000EA77 0000EA77 00008000 00008000 00009C57 00009C57</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00000CCC 00000E49 0000427B 000044EC 0001ADC7 0001ADC7 00008000 00008000 00009C40 00009C40</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00001E5A 00001F37 00009A90 00009DDB 00030D57 00030D57 00008000 00008000 00007530 00007530</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00001589 0000154B 00009065 00009233 0000EA77 0000EA77 00008000 00008000 00009C40 00009C40</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 000013E8 00001503 0000911B 000089A7 0002BF37 0002BF37 00008000 00008000 0000EA77 0000EA77</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00001227 0000129E 0000520A 00005418 0000EA77 0002E647 00008000 00008000 00007530 0000C367</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 0000078D 000008CE 000055D5 00005136 0000C350 0000C350 00008000 00008000 0000C350 0000C350</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 000010FA 00001086 000093F3 0000A3C0 00027117 00027117 00008000 00008000 00009C57 00009C57</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00001500 00001769 0000C21D 0000CCFC 00027117 00027117 00008000 00008000 00011170 00011170</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00000027 00000026 0000005F 00000062 0001ADDE 0001ADDE 00001F8E 00002007 0001ADC7 0001ADC7</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>comment:&nbsp; 00001680 00001494 000098EF 000092C1 00013897 00013897 00008000 00008000 00002727 00002727</b></div></body></html>