Bug 13892 - Can't store music folder with non-latin characters
: Can't store music folder with non-latin characters
Status: VERIFIED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.4.0
: Macintosh Windows XP
: P1 normal with 3 votes (vote)
: 7.4.1
Assigned To: Squeezebox QA Team email alias
: charset_issues
Depends on: 14503
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-07 03:35 UTC by Michael Herger
Modified: 2009-10-14 10:44 UTC (History)
4 users (show)

See Also:
Category: Bug


Attachments
possible fix to non-latin audio dir (1.54 KB, patch)
2009-10-09 08:21 UTC, Michael Herger
Details | Diff
improved patch to non-latin audiodir fix: cover BMF in various UIs too (4.34 KB, patch)
2009-10-12 07:31 UTC, Michael Herger
Details | Diff
Wrong characters after latest 7.4.1 with 13892 fix (19.15 KB, image/pjpeg)
2009-10-13 10:07 UTC, Serg Ust
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-09-07 03:35:27 UTC
We've been there before... If I store a music folder eg. "f:\Müsig", SC will fail reading it. BMF returns an empty page, the web settings dialog shows a broken character etc.

Adrian, Andy - at some point we had added the $prefs->setUtf8Off() for file paths, to make sure their utf8 flags were turned off. It seems like after all the magic Andy applied to the scanning and file name handling this actually breaks things. Removing that line from S::U::Prefs would fix the above issue (at least on Windows after a quick test). Is this still needed on some platform?
Comment 1 Michael Herger 2009-09-07 03:55:29 UTC
Sure enough it would break things on OSX: the turning off of that flag would trigger the onchange handler before the DB is initialized, killing SC immediately
Comment 2 Michael Herger 2009-10-01 09:01:05 UTC
not a sky-is-falling problem
Comment 3 Michael Herger 2009-10-01 09:12:46 UTC
*** Bug 14480 has been marked as a duplicate of this bug. ***
Comment 4 Petr Kupka 2009-10-02 04:12:17 UTC
Hello,

after i did update to 7.4. (this tuesday) I can not display content of my Music Folder. This is very unfortunable. I see the item Music Folder but when I want to see the content it happen nothing.
I have 1 controller and 4 SB Duet
Comment 5 Michael Herger 2009-10-04 00:36:37 UTC
SBS is mostly useless in our newly supported languages CZ/PL/RU because of this issue...

http://forums.slimdevices.com/showthread.php?t=68998
Comment 6 Michael Herger 2009-10-04 13:04:47 UTC
*** Bug 14569 has been marked as a duplicate of this bug. ***
Comment 7 Gilles2 2009-10-05 00:55:12 UTC
I think I have the same issue here. Using WHS, scanner always stops at the same file with special characters. What makes it more complex : I renamed the folder but this doesn't seem to solve it. 
The "Album" info in the file has also special characters, maybe this impacts.
Comment 8 Serg Ust 2009-10-05 06:49:35 UTC
using my temporal solution for fixing default Win XP codepage 
see my post 
http://forums.slimdevices.com/showthread.php?t=68912
I have no single trouble now to access Music Folder files (Russian, Swedish etc)
I have about 72.000 Flac files in my library. Can access them all, have NO scanning problems.
As my XP is installed on home server PC, this temporal Unicode to English default codepage doesn't hurt PC fuynctioning much.. But for home PC (that you are using for work) I wont reccomend this solution.
Comment 9 Serg Ust 2009-10-05 08:36:35 UTC
using my temporal solution for fixing default Win XP codepage 
see my post 
http://forums.slimdevices.com/showthread.php?t=68912
I have no single trouble now to access Music Folder files (Russian, Swedish etc)
I have about 72.000 Flac files in my library. Can access them all, have NO scanning problems.
As my XP is installed on home server PC, this temporal Unicode to English default codepage doesn't hurt PC fuynctioning much.. But for home PC (that you are using for work) I wont reccomend this solution.
Comment 10 Michael Herger 2009-10-09 08:21:30 UTC
Created attachment 6073 [details]
possible fix to non-latin audio dir

Andy - played around with this some more. This patch seems to fix this issue on OSX. Haven't tested potential side-effects and other platforms. Plus this would need a lot of cleanup work too, as I basically disabled a few lines which lead to unused code (setUtf8Off).

slimserver.pl needs some sanitizing too. Disabled the audiodir check, as this lead to a rescan before the DB was initialized...
Comment 11 Andrey 2009-10-09 23:36:38 UTC
Michael, Andy, does https://bugs-archive.lyrion.org/show_bug.cgi?id=14386 look like related?
Comment 12 Michael Herger 2009-10-09 23:46:52 UTC
Related, but not the same.

To my great surprise this patch does work on Windows too...
Comment 13 Michael Herger 2009-10-12 07:31:29 UTC
Created attachment 6081 [details]
improved patch to non-latin audiodir fix: cover BMF in various UIs too
Comment 14 SVN Bot 2009-10-12 10:07:41 UTC
 == Auto-comment from SVN commit #28817 to the slim repo by michael ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28817 ==

Bug: 13892
Description: don't trigger new scan at that point - DB isn't ready yet
Comment 15 SVN Bot 2009-10-12 10:27:15 UTC
 == Auto-comment from SVN commit #28819 to the slim repo by michael ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28819 ==

Fixed Bug: 13892 +8
Description: don't do the utf8off trick any more - this is only needed on Windows, where we better use the Win32::GetANSIPathName() function.

Please give the next nightly a try. Tested on XP/OSX/Debian, but western systems only (though with Hebrew & other path names)
Comment 16 SVN Bot 2009-10-12 13:45:00 UTC
 == Auto-comment from SVN commit #28824 to the slim repo by michael ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28824 ==

Bug: 13892
Description: use Win32::GetANSIPathName() in prefs dir/file validation function
Comment 17 Serg Ust 2009-10-13 10:07:45 UTC
Created attachment 6103 [details]
Wrong characters after latest 7.4.1 with 13892 fix
Comment 18 James Richardson 2009-10-13 14:03:44 UTC
Please re-test with SBS 7.4.1 r28825 or later.  You may have to do a clean scan as well.  Let me know if this resolves the issue for you.
Comment 19 James Richardson 2009-10-14 10:44:18 UTC
Verified fixed in SP r7847, SBS r28848, waiting on customer confirmation for final closure