Parsing iTunes XML file may fail due to incorrect encoded input

Bug #501916 reported by RAFFI TEA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
RJ Skerry-Ryan

Bug Description

The iTunes library XML declares that it uses utf-8 encoding. However, on my system the XML file also contains characters that are not valid utf-8 (these were windows-1251 characters in my case). In such a case, Mixxx/QT cannot import the iTunes library.

This is a well-known bug in QT, see http://bugreports.qt.nokia.com/browse/QTBUG-4923

You can bypass the problem by editing the iTunes XML file, that is, change the encoding in the header to whatever you use on your system.

If you need my iTunes XMl file, feel free to ask.

######################################################################
Debug: [Main]: Unimplemented AbstractXmlTrackModel constructor
Debug: [Main]: ITunesLibrary=[ "D:\Tobias\Privat\Musik\iTunes\iTunes Music Libra
ry.xml" ]
Error FODC0002 in tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:u, at l
ine 66884, column 118: Encountered incorrectly encoded content.
Error XPDY0002 in file:///D:/Tobias/MixxxBuilds/features_sqlite/mixxx/dist/mixxx
.exe, at line 1, column 1: The focus is undefined.
Debug: [Main]: Library::slotShowTrackModel QSortFilterProxyModel(0x42f48e0)
Debug: [Main]: WTrackTableView::loadTrackModel() QSortFilterProxyModel(0x42f48e0
#########################################################################

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I'll take a look at this.

Changed in mixxx:
importance: Undecided → Medium
assignee: nobody → RJ Ryan (rryan)
milestone: none → 1.8.0
status: New → Fix Committed
status: Fix Committed → Confirmed
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Could you please attach your iTunes XML (or email me if you prefer, <email address hidden>)?

Thanks very much,
RJ Ryan

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey again Tobias, would you mind sending me your iTunes XML file? I haven't been able to find any examples of iTunes XML files that have the problem.

Thanks,
RJ Ryan

Revision history for this message
RAFFI TEA (raffitea) wrote : Re: [Bug 501916] Re: Parsing iTunes XML file may fail due to incorrect encoded input

Here's my library. I hope you can reproduce the parsing errors, too.

My test system is Windows 7 32Bit (German) where Mixxx is compiled
against QT 4.6, Itunes 9

Good luck :-)

Tobias

Am 31.01.2010 00:00, schrieb RJ Ryan:
> Hey again Tobias, would you mind sending me your iTunes XML file? I
> haven't been able to find any examples of iTunes XML files that have the
> problem.
>
> Thanks,
> RJ Ryan
>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey Tobias,

What encoding can you change the file to to make it work? I tried windows-1251 and it still failed.

Thanks,
RJ

Revision history for this message
RAFFI TEA (raffitea) wrote :

IHey RJ,

I used <?xml version="1.0" encoding="ISO-8859-1" ...>

Am 01.02.2010 03:09, schrieb RJ Ryan:
> Hey Tobias,
>
> What encoding can you change the file to to make it work? I tried
> windows-1251 and it still failed.
>
> Thanks,
> RJ
>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey Tobias,

I took a look and it looks like iTunes is confused as to what constitutes UTF-8 :). Anyway, I added a workaround that first loads the XML and converts it to UTF-8 manually, then loads it. I'm hoping that iTunes always sets the encoding to UTF-8, though that might not be a fair assumption. In any case, this should work now for you.

Thanks for the bug report,
RJ

Changed in mixxx:
status: Confirmed → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5263

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.