When specifying podcast save location with Korean characters in path, it is garbled after restarting Amarok. Amarok repeatly creates meaningless folders on the disk, so I need to modify path not to contain any Korean characters. This is problematic since "Music" folder is localized into "음악" by default when system locale is set to Korean. Reproducible: Always Steps to Reproduce: 1. Specify podcast save location containing Korean. Example: "/home_hdd/psj/음악/podcasts/" 2. Restart Amarok. 3. Check back save location of same podcast. Actual Results: Save location is changed into "/home_hdd/psj/�일 4월 27 2014DC악/podcasts/" Expected Results: It should stay same "/home_hdd/psj/음악/podcasts/"
Does this still happen on current versions of Amarok?
(In reply to Eike Hein from comment #1) > Does this still happen on current versions of Amarok? Well, the current released version is 2.8, you will have to test with current git to see if there is a change.
(In reply to Myriam Schweingruber from comment #2) > (In reply to Eike Hein from comment #1) > > Does this still happen on current versions of Amarok? > > Well, the current released version is 2.8, you will have to test with > current git to see if there is a change. I tested using both today's git and Ubuntu 14.10 package (2.8.0-0ubuntu4), and the bug is still there. My test steps were the same as original description, for further tests I've added an example podcast address: 1) Add some podcast with Korean title (for example: http://www.xsfm.co.kr/xml/idwk.xml) 2) Check out save location just after adding the podcast (Should be: $HOME/.kde/share/apps/amarok/podcasts/그것은 알기 싫다) 3) Restart Amarok, re-check the save location (Broken: $HOME/.kde/share/apps/amarok/podcasts/그것�금 1월 16 2015D� ��C기�B��B�)
^ Thank you -- I'll try to reproduce this within the next days and fix it.
Yep, can reproduce it.
I've figured out what happens: KUrl turns the Korean characters in the save location into percent-encoding, which results in '%<number>' embeds in the URL string which later cause trouble when a SQL query builder uses QString::arg() to insert the URL and other data into a query template. I'll port the query builder away from arg() to fix this.
Git commit 0e069fcdc1bd7fe3052c9bdba624e11a2d9d6a75 by Eike Hein. Committed on 16/01/2015 at 21:07. Pushed by hein into branch 'master'. Port the SqlPodcastChannel query builder from QString::arg() to QTextStream. Among the query payload is a local filesystem URL, which may contain percent-encoded non-ASCII data, e.g. a directory name written in Korean. This causes havoc in combiation with the percent sign-based placeholders QString::arg() operates on. The SqlPodcastEpisode query builder was already using QTextStream. M +63 -29 src/core-impl/podcasts/sql/SqlPodcastMeta.cpp http://commits.kde.org/amarok/0e069fcdc1bd7fe3052c9bdba624e11a2d9d6a75