Index: server/Slim/Formats/FLAC.pm =================================================================== RCS file: /cvsroot/slim/server/Slim/Formats/FLAC.pm,v retrieving revision 1.9 diff -u -r1.9 FLAC.pm --- server/Slim/Formats/FLAC.pm 26 Jan 2004 05:44:13 -0000 1.9 +++ server/Slim/Formats/FLAC.pm 26 Jun 2004 06:29:24 -0000 @@ -18,6 +18,7 @@ use strict; use Audio::FLAC; use MP3::Info (); +use Slim::Utils::Misc; my %tagMapping = ( 'TRACKNUMBER' => 'TRACKNUM', @@ -25,6 +26,18 @@ 'DISCNUMBER' => 'DISC', ); +my @tagNames = ( + 'ALBUM', + 'ARTIST', + 'BAND', + 'COMPOSER', + 'CONDUCTOR', + 'DISCNUMBER', + 'TITLE', + 'TRACKNUMBER', + 'DATE', +); + # Given a file, return a hash of name value pairs, # where each name is a tag name. sub getTag { @@ -42,6 +55,14 @@ # There should be a TITLE tag if the VORBIS tags are to be trusted if (defined $tags->{'TITLE'}) { + + # Convert the tag values to from utf8 to latin1 + foreach my $tag (@tagNames) { + if (exists $tags->{$tag}) { + my $utf8tag = $tags->{$tag}; + $tags->{$tag} = Slim::Utils::Misc::utf8toLatin1($utf8tag); + } + } # map the existing tag names to the expected tag names while (my ($old,$new) = each %tagMapping) {