Summary: | Amarok fails to play songs that contain special characters when using phonon-vlc | ||
---|---|---|---|
Product: | [Frameworks and Libraries] phonon-backend-vlc | Reporter: | thoebert |
Component: | general | Assignee: | Harald Sitter <sitter> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bcooksley, fabo, jb, martin.sandsmark, myriam |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.4 | |
Sentry Crash Report: |
Description
thoebert
2011-02-20 12:27:29 UTC
What system encoding do you use? $ locale LANG=de_DE.UTF-8 LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= The music is stored on an etx4 partition. This bug is rather weird I must say. http://www.fileformat.info/info/unicode/char/00C6/index.htm Encoding with LANG=de_DE.UTF-8: > PHONON-VLC BEGIN: void Phonon::VLC::MediaObject::loadMedia(const QString&) > PHONON-VLC loading: "file:///home/me/Ænima.mp3" > PHONON-VLC loading encoded: "file:///home/me/%C6nima.mp3" > PHONON-VLC END__: void Phonon::VLC::MediaObject::loadMedia(const QString&) [Took: 0s] So. The character is actually U+00C6 and thus %C6 ought to be the appropriate encoding on a unicode system. VLC however refuses to decode it properly. If however LANG=C: > PHONON-VLC BEGIN: void Phonon::VLC::MediaObject::loadMedia(const QString&) > PHONON-VLC loading: "file:///home/me/Ænima.mp3" > PHONON-VLC loading encoded: "file:///home/me/%C3%86nima.mp3" > PHONON-VLC END__: void Phonon::VLC::MediaObject::loadMedia(const QString&) [Took: 0s] libvlc succssfully decodes %C3%86... equally if you force %C3%86 manually on de_DE.UTF-8 it will still be decoded properly. My best guess right now is that it is a bug in libvlc, needs some looking into though. Oh, actually I just noticed something... if we encode a local8bit version of the string it spits out %C3%86, maybe we should use that... well, needs testing and looking into now :) Found the issue, we were encoding at one point, then converted to UTF8 and then wrongly encoded at another point (just before percent encoding the whole beast). Git commit 28ac4780f879bca6df3e67c49a2a164993430361 by Harald Sitter. Committed on 24/02/2011 at 10:05. Pushed by sitter into branch 'master'. A nice approach to fix file encoding problems a bit more... * loadMedia by default wants an encoded QBA now * there also is an overload for QString which simply does toUtf8 * local files are now encoded to local 8-bit and along with remote urls percent encoded to QBA and passed to loadMedia This *should* fix encoding problems proper now. It is however to be noted that Phonon 4.5's Mrl class will deal with these issues at better scale. BUG: 266719 M +1 -1 vlc/libvlc.h M +17 -18 vlc/mediaobject.cpp M +15 -0 vlc/mediaobject.h http://commits.kde.org/phonon-vlc/28ac4780f879bca6df3e67c49a2a164993430361 Reassigning to the new bugzilla product for better bug tracing of the various backends. Sorry for the noise. |