Version: unspecified (using Devel) OS: Linux Playing a file that has accents in its name (need not be Unicode; any ISO-8859-1 high half character will do) writes its URL to share/apps/kmplayer/recent.xml. On every subsequent run of kmplayer, the representation of that URL appears to be corrupted. After a few more runs, the file approximately doubles in size every time and soon affects the startup/shutdown performance of kmplayer. This problem perists without limit until the recent.xml file is removed. Starting with an empty file, after playing one media file with a single accented character in its name (file pathnames shortened): <playlist> <item url="/d/23 - Der Maulwurf in der WÃŒste.avi"/> </playlist> After playing another file: <playlist> <item url="/d/25 - Der Maulwurf auf dem Karneval.avi"/> <item url="/d/23 - Der Maulwurf in der WÃ<83>ÂŒste.avi"/> </playlist> After playing a third file: <playlist> <item url="/d/33 - Der Kleine Maulwurf und die Freundschaft.avi"/> <item url="/d/25 - Der Maulwurf auf dem Karneval.avi"/> <item url="/d/23 - Der Maulwurf in der WÃ<83>Â <83>Ã<82>ÂŒste.avi"/> </playlist> After a fourth file: <playlist> <item url="/d/28 - Der Maulwurf und die Medizin.avi"/> <item url="/d/33 - Der Kleine Maulwurf und die Freundschaft.avi"/> <item url="/d/25 - Der Maulwurf auf dem Karneval.avi"/> <item url="/d/23 - Der Maulwurf in der WÃ<83>Â <83>Ã<82>Â<83>Ã<83>Â<82>Ã<82>ÂŒste.avi"/> </playlist> After playing about 20 files, the file has grown to 1.1Mb in size of which most is taken up by the enormously long last <item> element. Now it is noticeable that kmplayer takes a few seconds to start up or close. After playing a few more files, it is unusable. Reproducible: Always Steps to Reproduce: Start with an empty recent.xml file, play a media file that has an accented character in its name. Now play some more files, and observe the size and contents of the recent.xml file after each run. Actual Results: The file grows in size every time, and kmplayer performance is affected. Expected Results: The application should behave. The output above is from less (which shows high-half characters as <hex>).
Workaround: rm .kde/share/apps/kmplayer/recent.xml touch .kde/share/apps/kmplayer/recent.xml chmod 000 .kde/share/apps/kmplayer/recent.xml This does not affect the "Open Recent" operation, because that list is stored in [Recent Files] in .kde/share/config/kmplayerrc
Looks like QTextStream didn't detect the UTF8 encoding. KMPlayer writes out these files in UTF8 and expects QTextStream to detect that. When your LANG env setting not is set to a UTF8 variant, it may perhaps fallback to ISO-8859-1. You didn't specify a version, so did you compile it yourself? If so, then please try adding inxml.setCodec("UTF-8"); in src/kmplayer_lists.cpp FileDocument::readFromFile after the line QTextStream inxml (&file);
Yes, self compiled (SVN r1281865). LANG=C KDE_LANG=en_GB ...because there are some non-KDE applications that I need to use that still don't like Unicode locales :-( Adding the setCodec() as described appears to solve the problem. Many thanks for the quick fix!
SVN commit 1282917 by vriezen: Set codec to utf8 when reading our own lists Apparently QTextStream doesn't detect it on non-utf8 locales M +1 -0 kmplayer_lists.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1282917