Problem with UTF-8 in playlists (.m3u8 files)
|
29-09-2015, 10:16
Post: #1
|
|||
|
|||
Problem with UTF-8 in playlists (.m3u8 files)
I'm running the latest version of Minimserver on a Raspberry Pi running raspbian wheezy. Most things work flawlessly (thanks for a great piece of software!) but it seems to have some problems with filenames containing UTF-8 characters in .m3u8 playlists. To illustrate:
Code: reiter@pi:~$ grep "^Minim" /opt/minimserver/data/minimserver.log Code: reiter@pi:~$ grep charset /opt/minimserver/data/minimserver.log Code: reiter@pi:~$ grep "05 Durme" /opt/minimserver/data/minimserver.log|head -3 Code: reiter@pi:~$ ls -l "/platte/Music/Manuel/Music/Aman Aman/Música I Cants Sefardis D'Orient I Occident/05 Durme_ Bana Yücelerden Seyreden Dilber.m4a" I notice the discrepancy between "found file 05 Durme_ Bana Y\u00fccelerden" and the direct display of the "ü" character in the cache and playlist entries in the log file, but don't have any idea how to proceed from here. Files not containing any non-ASCII characters from the same playlist get picked up correctly and added to the playlists. Any help is greatly appreciated! Thanks in advance! |
|||
29-09-2015, 10:29
Post: #2
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
Thanks for the problem report and the very detailed information you have provided. I will set up a test to see if I can reproduce this problem and I will let you know what I find.
|
|||
29-09-2015, 10:33
Post: #3
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
Thank you for looking into this! If I can provide any additional information, let me know.
|
|||
29-09-2015, 22:39
Post: #4
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
(29-09-2015 10:33)Manul Wrote: Thank you for looking into this! If I can provide any additional information, let me know. I have tried this and I can't reproduce the problem. Everything is working correctly and I don't see \u00fc in the "found file" message. Please post your output from running the 'locale' command. Also, what verison of Java are you using? This information should appear near the start of the MinimServer log. |
|||
30-09-2015, 06:25
Post: #5
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
Code: reiter@pi:~$ locale Code: reiter@pi:~$ grep -A 3 "^Minim" /opt/minimserver/data/minimserver.log What I probably should have mentioned in my first post (sorry!) is that the music files reside on an ext4 file system mounted via NFS from a NAS (D-Link DNS-320L): Code: reiter@pi:~$ mount|grep platte From the NAS side: Code: reiter@platte:~$ mount|grep sda2 There's no 'locale' command on the NAS, the only remotely related environment variable is Code: reiter@platte:~$ env|grep LANG I've also attached the complete Minimserver log file to this post. That's all information I can think of at the moment, let me know if you need anything else. |
|||
30-09-2015, 10:24
Post: #6
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
(30-09-2015 06:25)Manul Wrote: What I probably should have mentioned in my first post (sorry!) is that the music files reside on an ext4 file system mounted via NFS from a NAS (D-Link DNS-320L): It's very likely that this is the cause of the problem. Please try copying the file to a local disk and add the local disk to the contentDir setting. Do you get the same strange filename in the "found file" message for the local file? |
|||
30-09-2015, 11:06
Post: #7
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
Thanks again for your help. I get the same "found" message on a local filesystem, strangely immediately followed by a "reading" message showing the correct name:
Code: 11:59:26.238 main: deleting cache entry for Music/Aman Aman/Música I Cants Sefardis D'Orient I Occident/05 Durme_ Bana Yücelerden Seyreden Dilber.m4a This is indeed on a local ext4 filesystem: Code: reiter@pi:~$ ls -l /music/05\ Durme_\ Bana\ Yücelerden\ Seyreden\ Dilber.m4a I've deleted the file on the NFS mount to make sure there's no confusion in the log file as to which file is accessed. |
|||
30-09-2015, 12:10
(This post was last modified: 30-09-2015 12:10 by simoncn.)
Post: #8
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
Thanks for this. On further investigation, the Unicode value in the "found file" trace message is correct and is written in this rather strange format to enable it to display any filenames that aren't in the correct encoding for the platform default charset.
I wasn't seeing this earlier because I was testing with a folder name (not a filename) containing an accented character. I have now modified my test to use a filename containing an accented character. This produces the same messages that you are seeing but works correctly in a .m3u8 playlist. It is possible that there is a problem with the contents of your .m3u8 file. Please gzip your .m3u8 file and attach it to a post here. |
|||
30-09-2015, 12:46
Post: #9
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
Here you go.
|
|||
30-09-2015, 14:29
Post: #10
|
|||
|
|||
RE: Problem with UTF-8 in playlists (.m3u8 files)
(30-09-2015 12:46)Manul Wrote: Here you go. Thanks for this. The Unicode filenames that Java returns to MinimServer when scanning your library are in composed Unicode format but the filename entries in your .m3u8 file are in decomposed Unicode format. This means the filenames appear to be same when you look at them but they don't contain the same sequence of Unicode characters. MinimServer is comparing the sequence of Unicode characters and this comparison is failing. I recently fixed a similar problem with Unicode tag values (the fix will be in the next update) and I think I can use a similar fix to make the names in your .m3u8 file work correctly. It would be very helpful for me to know whether the actual filenames on the disk are in composed or decomposed format. Please run the commands: cd **any directory containing suitable files** ls -l >~/sample.txt gzip ~/sample.txt and attach the resulting sample.txt.gz file to a post here. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)