> There's still the problem I described with truncated filenames showing
> when browsing "Music Folder". For example, "José Padilla - Adios
> Ayer.mp3" is truncated to "Jos". (When you get to the "Song Info"
> page, the location field shows the correct filename.)
OK, I mucked around for a while and narrowed down the problem a little
bit. Keep in mind that I may not know what I am talking about.
When browsing folders on the web interface,
*Slim::Web::Pages::BrowseTree* gets the text to display using
*Slim::Music::Info::fileName*, which uses
*Slim::Utils::Misc::pathFromFileURL* to convert the file's URL to a
path. Here's a log snippet:
Code:
--------------------
[08-02-10 14:24:22.5603] Slim::Utils::Misc::stripRel (728) Original:
/home/netshares/mp3/Albums/Björk - Greatest Hits/15 - Björk - It's in Our
Hands.mp3
[08-02-10 14:24:22.5611] Slim::Utils::Misc::stripRel (734) Stripped:
/home/netshares/mp3/Albums/Björk - Greatest Hits/15 - Björk - It's in Our
Hands.mp3
[08-02-10 14:24:22.5623] Slim::Utils::Misc::fixPath (711) Fixed: 15 - Björk
- It's in Our Hands.mp3 to
file:///home/netshares/mp3/Albums/Bj%F6rk%20-%20Greatest%20Hits/15%20-%20Bj%F6rk%20-%20It%27s%20in%20Our%20Hands.mp3
[08-02-10 14:24:22.5631] Slim::Utils::Misc::fixPath (713) Base:
/home/netshares/mp3/Albums/Björk - Greatest Hits
[08-02-10 14:24:22.5692] Slim::Utils::Misc::pathFromFileURL (415) Got
/home/netshares/mp3/Albums/Bj%F6rk%20-%20Greatest%20Hits/15%20-%20Bj%F6rk%20-%20It%27s%20in%20Our%20Hands.mp3
from file url
file:///home/netshares/mp3/Albums/Bj%F6rk%20-%20Greatest%20Hits/15%20-%20Bj%F6rk%20-%20It%27s%20in%20Our%20Hands.mp3
[08-02-10 14:24:22.5702] Slim::Utils::Misc::pathFromFileURL (431) Extracted:
/home/netshares/mp3/Albums/Björk - Greatest Hits/15 - Björk - It's in Our
Hands.mp3 from
file:///home/netshares/mp3/Albums/Bj%F6rk%20-%20Greatest%20Hits/15%20-%20Bj%F6rk%20-%20It%27s%20in%20Our%20Hands.mp3
--------------------
The result from *pathFromFileURL* is UTF-8 encoded, in this case.
*fileName* finally uses *Slim::Utils::Unicode::utf8decode_locale* to
convert the string to UTF-8, if it is not already so. The code is:
Code:
--------------------
sub utf8decode_locale {
my $string = shift;
if ($string && $] > 5.007 && !Encode::is_utf8($string)) {
$string = Encode::decode($lc_ctype, $string, $FB_QUIET);
}
return $string;
}
--------------------
Because I'm such a n00b, I'm not sure what is happening here. I think
maybe the string is UTF-8 encoded, but not UTF-8 flagged, so
*Encode::is_utf8* returns false, then *Encode::decode* is used to try
to convert the string from the current locale (iso-8859-1) to UTF-8,
even though it is already UTF-8. The string returned by
*utf8decode_locale* is truncated at the position of the first accented
character. In my example, "15 - Björk - It's in Our Hands.mp3" gets
converted to "15 - Bj".
The problem is not limited to the web interface, as in this example.
The same thing happens on the Squeezebox.
Does this help? Even if my interpretation is completely wrong,
hopefully this will help shed some light on the problem.
Currently running SqueezeCenter Version: 7.0 - 17379 - Red Hat - EN -
utf8
--
Rhindle
------------------------------------------------------------------------
Rhindle's Profile: http://forums.slimdevices.com/member.php?userid=15406
View this thread: http://forums.slimdevices.com/showthread.php?t=43219
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/beta