Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 220245 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/blinkenlights/jid3/io/TextEncoding.java (-1 / +1 lines)
Lines 91-97 Link Here
91
            case (byte)0x00:
91
            case (byte)0x00:
92
                return "ISO-8859-1";
92
                return "ISO-8859-1";
93
            case (byte)0x01:
93
            case (byte)0x01:
94
                return "Unicode";
94
                return "UTF-16";
95
            default:
95
            default:
96
                return null;    // can't happen because we control construction of this object
96
                return null;    // can't happen because we control construction of this object
97
        }
97
        }
(-)src/org/blinkenlights/jid3/test/AllTests.java (-2 / +2 lines)
Lines 44-50 Link Here
44
public class AllTests extends TestCase
44
public class AllTests extends TestCase
45
{
45
{
46
    // set root path for testing, so tests can find the test files
46
    // set root path for testing, so tests can find the test files
47
    public static String s_RootPath = "c:/work/jid3/test_data/";
47
    public static String s_RootPath = "./test_data/";
48
48
49
    public static void main(String[] args)
49
    public static void main(String[] args)
50
    {
50
    {
Lines 134-140 Link Here
134
            }
134
            }
135
            
135
            
136
            // a 'visit list' was created by our visitor, recording which frames were visited, so we can compare
136
            // a 'visit list' was created by our visitor, recording which frames were visited, so we can compare
137
            if ( ! oTestID3Visitor.getVisitList().equals("3=DS+uw_PsKMr(VT$ICBUtvNyEzRL)W[QJO6*-"))
137
            if ( ! oTestID3Visitor.getVisitList().equals("3rstuvwyzBCDEIJKLMNOPQRSTUVW$()_=+[6*-"))
138
            {
138
            {
139
                fail("Unexpected resulting visit list: " + oTestID3Visitor.getVisitList());
139
                fail("Unexpected resulting visit list: " + oTestID3Visitor.getVisitList());
140
            }
140
            }
(-)src/org/blinkenlights/jid3/test/ID3V2Test.java (-14 / +14 lines)
Lines 540-546 Link Here
540
            oTALB.setTextEncoding(TextEncoding.UNICODE);
540
            oTALB.setTextEncoding(TextEncoding.UNICODE);
541
            oID3V2_3_0Tag.setTALBTextInformationFrame(oTALB);
541
            oID3V2_3_0Tag.setTALBTextInformationFrame(oTALB);
542
            
542
            
543
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>ATALB<bh:00><bh:00><bh:00>7<bh:00><bh:00><bh:01><bh:ff><bh:fe>a<bh:00>b<bh:00>c<bh:00>d<bh:00>e<bh:00>f<bh:00>g<bh:00>h<bh:00>i<bh:00>j<bh:00>k<bh:00>l<bh:00>m<bh:00>n<bh:00>o<bh:00>p<bh:00>q<bh:00>r<bh:00>s<bh:00>t<bh:00>u<bh:00>v<bh:00>w<bh:00>x<bh:00>y<bh:00>z<bh:00>";
543
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>ATALB<bh:00><bh:00><bh:00>7<bh:00><bh:00><bh:01><bh:fe><bh:ff><bh:00>a<bh:00>b<bh:00>c<bh:00>d<bh:00>e<bh:00>f<bh:00>g<bh:00>h<bh:00>i<bh:00>j<bh:00>k<bh:00>l<bh:00>m<bh:00>n<bh:00>o<bh:00>p<bh:00>q<bh:00>r<bh:00>s<bh:00>t<bh:00>u<bh:00>v<bh:00>w<bh:00>x<bh:00>y<bh:00>z";
544
544
545
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
545
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
546
        }
546
        }
Lines 744-750 Link Here
744
            oTIME.setTextEncoding(TextEncoding.UNICODE);
744
            oTIME.setTextEncoding(TextEncoding.UNICODE);
745
            oID3V2_3_0Tag.setTIMETextInformationFrame(oTIME);
745
            oID3V2_3_0Tag.setTIMETextInformationFrame(oTIME);
746
746
747
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00><bh:15>TIME<bh:00><bh:00><bh:00><bh:0b><bh:00><bh:00><bh:01><bh:ff><bh:fe>0<bh:00>8<bh:00>0<bh:00>5<bh:00>";
747
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00><bh:15>TIME<bh:00><bh:00><bh:00><bh:0b><bh:00><bh:00><bh:01><bh:fe><bh:ff><bh:00>0<bh:00>8<bh:00>0<bh:00>5";
748
            
748
            
749
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
749
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
750
        }
750
        }
Lines 1258-1264 Link Here
1258
            oTXXX = new TXXXTextInformationID3V2Frame("description2", "information2");
1258
            oTXXX = new TXXXTextInformationID3V2Frame("description2", "information2");
1259
            oID3V2_3_0Tag.addTXXXTextInformationFrame(oTXXX);
1259
            oID3V2_3_0Tag.addTXXXTextInformationFrame(oTXXX);
1260
1260
1261
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>aTXXX<bh:00><bh:00><bh:00>3<bh:00><bh:00><bh:01><bh:ff><bh:fe>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:00><bh:ff><bh:fe>i<bh:00>n<bh:00>f<bh:00>o<bh:00>r<bh:00>m<bh:00>a<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00>TXXX<bh:00><bh:00><bh:00><bh:1a><bh:00><bh:00><bh:00>description2<bh:00>information2";
1261
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>aTXXX<bh:00><bh:00><bh:00>3<bh:00><bh:00><bh:01><bh:fe><bh:ff><bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:fe><bh:ff><bh:00>i<bh:00>n<bh:00>f<bh:00>o<bh:00>r<bh:00>m<bh:00>a<bh:00>t<bh:00>i<bh:00>o<bh:00>nTXXX<bh:00><bh:00><bh:00><bh:1a><bh:00><bh:00><bh:00>description2<bh:00>information2";
1262
1262
1263
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1263
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1264
        }
1264
        }
Lines 1464-1470 Link Here
1464
            oWXXX = new WXXXUrlLinkID3V2Frame("another description", "http://www.grebenc.ca");
1464
            oWXXX = new WXXXUrlLinkID3V2Frame("another description", "http://www.grebenc.ca");
1465
            oID3V2_3_0Tag.addWXXXUrlLinkFrame(oWXXX);
1465
            oID3V2_3_0Tag.addWXXXUrlLinkFrame(oWXXX);
1466
1466
1467
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>vWXXX<bh:00><bh:00><bh:00>*<bh:00><bh:00><bh:00>another description<bh:00>http://www.grebenc.caWXXX<bh:00><bh:00><bh:00>8<bh:00><bh:00><bh:01><bh:ff><bh:fe>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:00>http://jid3.blinkenlights.org";
1467
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>vWXXX<bh:00><bh:00><bh:00>*<bh:00><bh:00><bh:00>another description<bh:00>http://www.grebenc.caWXXX<bh:00><bh:00><bh:00>8<bh:00><bh:00><bh:01><bh:fe><bh:ff><bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00>http://jid3.blinkenlights.org";
1468
1468
1469
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1469
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1470
        }
1470
        }
Lines 1519-1525 Link Here
1519
            oID3V2_3_0Tag.addAPICFrame(oAPIC);
1519
            oID3V2_3_0Tag.addAPICFrame(oAPIC);
1520
            oID3V2_3_0Tag.addAPICFrame(new APICID3V2Frame("image/jpeg", APICID3V2Frame.PictureType.FrontCover, "Front cover.", new byte[] { 0x05, 0x04, 0x03, 0x02, 0x01 }));
1520
            oID3V2_3_0Tag.addAPICFrame(new APICID3V2Frame("image/jpeg", APICID3V2Frame.PictureType.FrontCover, "Front cover.", new byte[] { 0x05, 0x04, 0x03, 0x02, 0x01 }));
1521
1521
1522
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>bAPIC<bh:00><bh:00><bh:00>/<bh:00><bh:00><bh:01>image/png<bh:00><bh:08><bh:ff><bh:fe>A<bh:00>r<bh:00>t<bh:00>i<bh:00>s<bh:00>t<bh:00> <bh:00>i<bh:00>m<bh:00>a<bh:00>g<bh:00>e<bh:00>.<bh:00><bh:00><bh:00><bh:01><bh:02><bh:03><bh:04><bh:05>APIC<bh:00><bh:00><bh:00><bh:1f><bh:00><bh:00><bh:00>image/jpeg<bh:00><bh:03>Front cover.<bh:00><bh:05><bh:04><bh:03><bh:02><bh:01>";
1522
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>bAPIC<bh:00><bh:00><bh:00>/<bh:00><bh:00><bh:01>image/png<bh:00><bh:08><bh:fe><bh:ff><bh:00>A<bh:00>r<bh:00>t<bh:00>i<bh:00>s<bh:00>t<bh:00> <bh:00>i<bh:00>m<bh:00>a<bh:00>g<bh:00>e<bh:00>.<bh:00><bh:00><bh:01><bh:02><bh:03><bh:04><bh:05>APIC<bh:00><bh:00><bh:00><bh:1f><bh:00><bh:00><bh:00>image/jpeg<bh:00><bh:03>Front cover.<bh:00><bh:05><bh:04><bh:03><bh:02><bh:01>";
1523
            
1523
            
1524
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1524
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1525
        }
1525
        }
Lines 1556-1562 Link Here
1556
            oID3V2_3_0Tag.addCOMMFrame(oCOMM);
1556
            oID3V2_3_0Tag.addCOMMFrame(oCOMM);
1557
            oID3V2_3_0Tag.addCOMMFrame(new COMMID3V2Frame("rus", "next description", "next actual text"));
1557
            oID3V2_3_0Tag.addCOMMFrame(new COMMID3V2Frame("rus", "next description", "next actual text"));
1558
1558
1559
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>{COMM<bh:00><bh:00><bh:00>B<bh:00><bh:00><bh:01>eng<bh:ff><bh:fe>s<bh:00>h<bh:00>o<bh:00>r<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:00><bh:ff><bh:fe>a<bh:00>c<bh:00>t<bh:00>u<bh:00>a<bh:00>l<bh:00> <bh:00>t<bh:00>e<bh:00>x<bh:00>t<bh:00>COMM<bh:00><bh:00><bh:00>%<bh:00><bh:00><bh:00>rusnext description<bh:00>next actual text";
1559
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>{COMM<bh:00><bh:00><bh:00>B<bh:00><bh:00><bh:01>eng<bh:fe><bh:ff><bh:00>s<bh:00>h<bh:00>o<bh:00>r<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:fe><bh:ff><bh:00>a<bh:00>c<bh:00>t<bh:00>u<bh:00>a<bh:00>l<bh:00> <bh:00>t<bh:00>e<bh:00>x<bh:00>tCOMM<bh:00><bh:00><bh:00>%<bh:00><bh:00><bh:00>rusnext description<bh:00>next actual text";
1560
            
1560
            
1561
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1561
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1562
        }
1562
        }
Lines 1605-1611 Link Here
1605
            oCOMR.setTextEncoding(TextEncoding.UNICODE);
1605
            oCOMR.setTextEncoding(TextEncoding.UNICODE);
1606
            oID3V2_3_0Tag.setCOMRFrame(oCOMR);
1606
            oID3V2_3_0Tag.setCOMRFrame(oCOMR);
1607
1607
1608
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>tCOMR<bh:00><bh:00><bh:00>j<bh:00><bh:00><bh:01>cad12.99<bh:00>25250101http://jid3.blinkenlights.org<bh:00><bh:03><bh:ff><bh:fe>s<bh:00>e<bh:00>l<bh:00>l<bh:00>e<bh:00>r<bh:00><bh:00><bh:00><bh:ff><bh:fe>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:00>image/png<bh:00><bh:01><bh:02><bh:03><bh:04><bh:05>";
1608
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>tCOMR<bh:00><bh:00><bh:00>j<bh:00><bh:00><bh:01>cad12.99<bh:00>25250101http://jid3.blinkenlights.org<bh:00><bh:03><bh:fe><bh:ff><bh:00>s<bh:00>e<bh:00>l<bh:00>l<bh:00>e<bh:00>r<bh:00><bh:00><bh:fe><bh:ff><bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00>image/png<bh:00><bh:01><bh:02><bh:03><bh:04><bh:05>";
1609
1609
1610
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1610
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1611
        }
1611
        }
Lines 1717-1723 Link Here
1717
            oGEOB = new GEOBID3V2Frame("image/jpeg", "filename2", "another content description", new byte[] { 0x05, 0x04, 0x03, 0x02, 0x01 });
1717
            oGEOB = new GEOBID3V2Frame("image/jpeg", "filename2", "another content description", new byte[] { 0x05, 0x04, 0x03, 0x02, 0x01 });
1718
            oID3V2_3_0Tag.addGEOBFrame(oGEOB);
1718
            oID3V2_3_0Tag.addGEOBFrame(oGEOB);
1719
1719
1720
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:01><bh:19>GEOB<bh:00><bh:00><bh:00>7<bh:00><bh:00><bh:00>image/jpeg<bh:00>filename2<bh:00>another content description<bh:00><bh:05><bh:04><bh:03><bh:02><bh:01>GEOB<bh:00><bh:00><bh:00>N<bh:00><bh:00><bh:01>image/png<bh:00><bh:ff><bh:fe>f<bh:00>i<bh:00>l<bh:00>e<bh:00>n<bh:00>a<bh:00>m<bh:00>e<bh:00><bh:00><bh:00><bh:ff><bh:fe>c<bh:00>o<bh:00>n<bh:00>t<bh:00>e<bh:00>n<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:00><bh:01><bh:02><bh:03><bh:04><bh:05>";
1720
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:01><bh:19>GEOB<bh:00><bh:00><bh:00>7<bh:00><bh:00><bh:00>image/jpeg<bh:00>filename2<bh:00>another content description<bh:00><bh:05><bh:04><bh:03><bh:02><bh:01>GEOB<bh:00><bh:00><bh:00>N<bh:00><bh:00><bh:01>image/png<bh:00><bh:fe><bh:ff><bh:00>f<bh:00>i<bh:00>l<bh:00>e<bh:00>n<bh:00>a<bh:00>m<bh:00>e<bh:00><bh:00><bh:fe><bh:ff><bh:00>c<bh:00>o<bh:00>n<bh:00>t<bh:00>e<bh:00>n<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>i<bh:00>o<bh:00>n<bh:00><bh:00><bh:01><bh:02><bh:03><bh:04><bh:05>";
1721
1721
1722
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1722
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1723
        }
1723
        }
Lines 1779-1785 Link Here
1779
            oIPLS.setTextEncoding(TextEncoding.UNICODE);
1779
            oIPLS.setTextEncoding(TextEncoding.UNICODE);
1780
            oID3V2_3_0Tag.setIPLSFrame(oIPLS);
1780
            oID3V2_3_0Tag.setIPLSFrame(oIPLS);
1781
1781
1782
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:01><bh:15>IPLS<bh:00><bh:00><bh:00><bh:8b><bh:00><bh:00><bh:01><bh:ff><bh:fe>i<bh:00>n<bh:00>v<bh:00>o<bh:00>l<bh:00>v<bh:00>e<bh:00>m<bh:00>e<bh:00>n<bh:00>t<bh:00>1<bh:00><bh:00><bh:00><bh:ff><bh:fe>p<bh:00>e<bh:00>r<bh:00>s<bh:00>o<bh:00>n<bh:00>1<bh:00><bh:00><bh:00><bh:ff><bh:fe>i<bh:00>n<bh:00>v<bh:00>o<bh:00>l<bh:00>v<bh:00>e<bh:00>m<bh:00>e<bh:00>n<bh:00>t<bh:00>1<bh:00><bh:00><bh:00><bh:ff><bh:fe>p<bh:00>e<bh:00>r<bh:00>s<bh:00>o<bh:00>n<bh:00>2<bh:00><bh:00><bh:00><bh:ff><bh:fe>i<bh:00>n<bh:00>v<bh:00>o<bh:00>l<bh:00>v<bh:00>e<bh:00>m<bh:00>e<bh:00>n<bh:00>t<bh:00>2<bh:00><bh:00><bh:00><bh:ff><bh:fe>p<bh:00>e<bh:00>r<bh:00>s<bh:00>o<bh:00>n<bh:00>3<bh:00><bh:00><bh:00>";
1782
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:01><bh:15>IPLS<bh:00><bh:00><bh:00><bh:8b><bh:00><bh:00><bh:01><bh:fe><bh:ff><bh:00>i<bh:00>n<bh:00>v<bh:00>o<bh:00>l<bh:00>v<bh:00>e<bh:00>m<bh:00>e<bh:00>n<bh:00>t<bh:00>1<bh:00><bh:00><bh:fe><bh:ff><bh:00>p<bh:00>e<bh:00>r<bh:00>s<bh:00>o<bh:00>n<bh:00>1<bh:00><bh:00><bh:fe><bh:ff><bh:00>i<bh:00>n<bh:00>v<bh:00>o<bh:00>l<bh:00>v<bh:00>e<bh:00>m<bh:00>e<bh:00>n<bh:00>t<bh:00>1<bh:00><bh:00><bh:fe><bh:ff><bh:00>p<bh:00>e<bh:00>r<bh:00>s<bh:00>o<bh:00>n<bh:00>2<bh:00><bh:00><bh:fe><bh:ff><bh:00>i<bh:00>n<bh:00>v<bh:00>o<bh:00>l<bh:00>v<bh:00>e<bh:00>m<bh:00>e<bh:00>n<bh:00>t<bh:00>2<bh:00><bh:00><bh:fe><bh:ff><bh:00>p<bh:00>e<bh:00>r<bh:00>s<bh:00>o<bh:00>n<bh:00>3<bh:00><bh:00>";
1783
1783
1784
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1784
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1785
        }
1785
        }
Lines 1871-1877 Link Here
1871
            oOWNE.setTextEncoding(TextEncoding.UNICODE);
1871
            oOWNE.setTextEncoding(TextEncoding.UNICODE);
1872
            oID3V2_3_0Tag.setOWNEFrame(oOWNE);
1872
            oID3V2_3_0Tag.setOWNEFrame(oOWNE);
1873
1873
1874
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>*OWNE<bh:00><bh:00><bh:00> <bh:00><bh:00><bh:01>cad12.34<bh:00>20000102<bh:ff><bh:fe>s<bh:00>e<bh:00>l<bh:00>l<bh:00>e<bh:00>r<bh:00>";
1874
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>*OWNE<bh:00><bh:00><bh:00> <bh:00><bh:00><bh:01>cad12.34<bh:00>20000102<bh:fe><bh:ff><bh:00>s<bh:00>e<bh:00>l<bh:00>l<bh:00>e<bh:00>r";
1875
1875
1876
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1876
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
1877
        }
1877
        }
Lines 2063-2069 Link Here
2063
            oSYLT.addSyncEntry(new SYLTID3V2Frame.SyncEntry("def", 5));
2063
            oSYLT.addSyncEntry(new SYLTID3V2Frame.SyncEntry("def", 5));
2064
            oID3V2_3_0Tag.addSYLTFrame(oSYLT);
2064
            oID3V2_3_0Tag.addSYLTFrame(oSYLT);
2065
2065
2066
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:01><bh:1a>SYLT<bh:00><bh:00><bh:00><bh:5c><bh:00><bh:00><bh:01>eng<bh:02><bh:01><bh:ff><bh:fe>c<bh:00>o<bh:00>n<bh:00>t<bh:00>e<bh:00>n<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>o<bh:00>r<bh:00><bh:00><bh:00><bh:ff><bh:fe>o<bh:00>n<bh:00>e<bh:00><bh:00><bh:00><bh:00><bh:00><bh:00><bh:01><bh:ff><bh:fe>t<bh:00>w<bh:00>o<bh:00><bh:00><bh:00><bh:00><bh:00><bh:00><bh:02><bh:ff><bh:fe>t<bh:00>h<bh:00>r<bh:00>e<bh:00>e<bh:00><bh:00><bh:00><bh:00><bh:00><bh:00><bh:03>SYLT<bh:00><bh:00><bh:00>*<bh:00><bh:00><bh:00>rus<bh:01><bh:06>another description<bh:00>abc<bh:00><bh:00><bh:00><bh:00><bh:04>def<bh:00><bh:00><bh:00><bh:00><bh:05>";
2066
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:01><bh:1a>SYLT<bh:00><bh:00><bh:00><bh:5c><bh:00><bh:00><bh:01>eng<bh:02><bh:01><bh:fe><bh:ff><bh:00>c<bh:00>o<bh:00>n<bh:00>t<bh:00>e<bh:00>n<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>o<bh:00>r<bh:00><bh:00><bh:fe><bh:ff><bh:00>o<bh:00>n<bh:00>e<bh:00><bh:00><bh:00><bh:00><bh:00><bh:01><bh:fe><bh:ff><bh:00>t<bh:00>w<bh:00>o<bh:00><bh:00><bh:00><bh:00><bh:00><bh:02><bh:fe><bh:ff><bh:00>t<bh:00>h<bh:00>r<bh:00>e<bh:00>e<bh:00><bh:00><bh:00><bh:00><bh:00><bh:03>SYLT<bh:00><bh:00><bh:00>*<bh:00><bh:00><bh:00>rus<bh:01><bh:06>another description<bh:00>abc<bh:00><bh:00><bh:00><bh:00><bh:04>def<bh:00><bh:00><bh:00><bh:00><bh:05>";
2067
2067
2068
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
2068
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
2069
        }
2069
        }
Lines 2141-2147 Link Here
2141
            oUSER.setTextEncoding(TextEncoding.UNICODE);
2141
            oUSER.setTextEncoding(TextEncoding.UNICODE);
2142
            oID3V2_3_0Tag.setUSERFrame(oUSER);
2142
            oID3V2_3_0Tag.setUSERFrame(oUSER);
2143
            
2143
            
2144
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>*USER<bh:00><bh:00><bh:00> <bh:00><bh:00><bh:01>eng<bh:ff><bh:fe>T<bh:00>e<bh:00>r<bh:00>m<bh:00>s<bh:00> <bh:00>o<bh:00>f<bh:00> <bh:00>u<bh:00>s<bh:00>e<bh:00>.<bh:00>";
2144
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>*USER<bh:00><bh:00><bh:00> <bh:00><bh:00><bh:01>eng<bh:fe><bh:ff><bh:00>T<bh:00>e<bh:00>r<bh:00>m<bh:00>s<bh:00> <bh:00>o<bh:00>f<bh:00> <bh:00>u<bh:00>s<bh:00>e<bh:00>.";
2145
2145
2146
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
2146
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
2147
        }
2147
        }
Lines 2177-2183 Link Here
2177
            oUSLT.setTextEncoding(TextEncoding.UNICODE);
2177
            oUSLT.setTextEncoding(TextEncoding.UNICODE);
2178
            oID3V2_3_0Tag.addUSLTFrame(oUSLT);
2178
            oID3V2_3_0Tag.addUSLTFrame(oUSLT);
2179
            
2179
            
2180
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>DUSLT<bh:00><bh:00><bh:00>:<bh:00><bh:00><bh:01>eng<bh:ff><bh:fe>c<bh:00>o<bh:00>n<bh:00>t<bh:00>e<bh:00>n<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>o<bh:00>r<bh:00><bh:00><bh:00><bh:ff><bh:fe>l<bh:00>y<bh:00>r<bh:00>i<bh:00>c<bh:00>s<bh:00>";
2180
            String sPrefix = "ID3<bh:03><bh:00><bh:00><bh:00><bh:00><bh:00>DUSLT<bh:00><bh:00><bh:00>:<bh:00><bh:00><bh:01>eng<bh:fe><bh:ff><bh:00>c<bh:00>o<bh:00>n<bh:00>t<bh:00>e<bh:00>n<bh:00>t<bh:00> <bh:00>d<bh:00>e<bh:00>s<bh:00>c<bh:00>r<bh:00>i<bh:00>p<bh:00>t<bh:00>o<bh:00>r<bh:00><bh:00><bh:fe><bh:ff><bh:00>l<bh:00>y<bh:00>r<bh:00>i<bh:00>c<bh:00>s";
2181
2181
2182
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
2182
            runTagVerifyTest(oID3V2_3_0Tag, sPrefix);
2183
        }
2183
        }
Lines 2599-2605 Link Here
2599
        ID3Tag.useStrict(false);
2599
        ID3Tag.useStrict(false);
2600
        try
2600
        try
2601
        {
2601
        {
2602
            File oSourceDir = new File("c:/temp/mp3");
2602
            File oSourceDir = new File("test_data");
2603
            recurseDirectoryForMP3s(oSourceDir);
2603
            recurseDirectoryForMP3s(oSourceDir);
2604
        }
2604
        }
2605
        catch (Exception e)
2605
        catch (Exception e)
(-)src/org/blinkenlights/jid3/v2/ID3V2Tag.java (-2 / +2 lines)
Lines 50-56 Link Here
50
    protected boolean m_bCRCDataFlag;
50
    protected boolean m_bCRCDataFlag;
51
    
51
    
52
    /** Mapping from frame ID to list containing frames. For frames that can only be used once. */
52
    /** Mapping from frame ID to list containing frames. For frames that can only be used once. */
53
    protected Map m_oFrameIdToFrameMap = null;
53
    protected SortedMap m_oFrameIdToFrameMap = null;
54
    
54
    
55
    /** Default padding for ID3 v2 frames, if not specified.  16 bytes, because Winamp does not read the last
55
    /** Default padding for ID3 v2 frames, if not specified.  16 bytes, because Winamp does not read the last
56
     *  frame when there isn't at least 6 bytes of padding following it in a tag. */
56
     *  frame when there isn't at least 6 bytes of padding following it in a tag. */
Lines 72-78 Link Here
72
        m_bUnsynchronizationUsedFlag = bUnsynchronizationUsedFlag;
72
        m_bUnsynchronizationUsedFlag = bUnsynchronizationUsedFlag;
73
        m_bExtendedHeaderFlag = bExtendedHeaderFlag;
73
        m_bExtendedHeaderFlag = bExtendedHeaderFlag;
74
        m_bExperimentalFlag = bExperimentalFlag;
74
        m_bExperimentalFlag = bExperimentalFlag;
75
        m_oFrameIdToFrameMap = new HashMap();
75
        m_oFrameIdToFrameMap = new TreeMap();
76
        //HACK: Default padding of 16 bytes, because Winamp doesn't seem to see the last frame in a v2 tag
76
        //HACK: Default padding of 16 bytes, because Winamp doesn't seem to see the last frame in a v2 tag
77
        //      when there is less than 6 bytes of padding.  (???)
77
        //      when there is less than 6 bytes of padding.  (???)
78
        m_iPaddingLength = s_iDefaultPaddingLength;
78
        m_iPaddingLength = s_iDefaultPaddingLength;

Return to bug 220245