Hi, I’ve got a music collection that has a number of non-English artists, and the collection and play lists do not properly encode the characters in the song and album titles. I’ve installed the Amarok-Lang package and restarted Amarok, but this had no effect. Where is the problem with the encoding? Do I have to add language to Grip (which is what I used to encode the tracks), and re-rip them all? Any ideas?
Here’s an example. All the characters that can’t be encoded appear as an uppercase-A with a tilde and a little “2” above it:
The problem is that the existing tags in your files don’t declare the UTF-8 encoding of the title. There used to be a Amarok FAQ entry for this but I can only find the French translation of it now. Don’t know if this means that newer versions of Amarok can detect and fix the problem.
Anyway this Perl script that used to be in the FAQ can fix the charset problems, but you may need to install the MP3::mplib module first. Give it a list of MP3 files to fix.
#!/usr/bin/perl
use MP3::Mplib;
sub fix ($) {
return unless -f $_[0];
my $mp3 = MP3::Mplib->new($_[0]);
my $v2tag = $mp3->get_v2tag;
print "Error writing tags of $ARGV[0]
" unless $mp3->set_v2tag($v2tag,&UTF8);
}
for my $f (@ARGV) {
print STDERR "Fixing $f
";
fix($f);
}
Yep, the mp3/Mplib package is pretty old and I searched but could not find a compatible RPM for it. Thank you for the suggestion, but are there any other ideas?
In that case it’s a different problem, those characters are probably in ISO8859 and you should either reencode the text in UTF-8 or declare them as ISO8859. I don’t know how to do those though, haven’t had to.
Ok, after fussing around with the collection, moving tracks out of and into the collection, and editing the track details, rescanning the collection several times, Amarok finally picked up on the changes to the files and I’ve got properly accented Gaelic characters now! Thank you very much for the help!
Can you tell, while we’re on the subject, where/what exactly are the track details kept? Are they in Amarok, or in the file itself? I don’t know exactly at what point the change happened, but i tried all of the above several times before Amarok got the characters correct. Is there no way to force Amarok to rescan a track in the collection other than deleting the file?