--- C:/Programme/SqueezeCenter/server/Slim/Plugin/MusicMagic/Plugin.pm.sav Thu Dec 11 14:38:46 2008 +++ C:/Programme/SqueezeCenter/server/Slim/Plugin/MusicMagic/Plugin.pm Thu Dec 18 09:13:21 2008 @@ -463,6 +463,22 @@ @moods = split(/\n/, $response->content); + if (scalar @moods) { + # MIP returns mood names as UTF-8 even on windows, so we need to convert + for my $mood (@moods) { + + if ($isWin) { + + $mood = Slim::Utils::Unicode::utf8decode_guess( + $mood, Slim::Utils::Unicode::encodingFromString($mood), + ); + } + + # need conversion to the current charset. + $mood = Slim::Utils::Unicode::utf8encode_locale($mood); + } + } + if ($log->is_debug && scalar @moods) { $log->debug("Found moods:"); @@ -775,7 +791,7 @@ if ($validMixTypes{$for} eq 'song' || $validMixTypes{$for} eq 'album') { # need to decode the file path when a file is used as seed - $id = Slim::Utils::Unicode::utf8decode_locale($id); + $id = $isWin ? $id : Slim::Utils::Unicode::utf8decode_locale($id); } else { # need to encode the search value (eg. artist) when a database value is used as seed