when using audio_getid3.module any UTF-8 data used in tags (artist and title) gets lost after submit. I hunted this down and the problem is due to audio_read_id3tags() reading id3v1 tags instead of id3v2

attached a trivial path that retains unicode tags.

also check
http://drupal.org/node/140982

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

Status: Needs review » Needs work

the only problem with this is that it only works when there's both v1 and v2. if there's only v2 then you'll load nothing. array_pop($value) might be a better way to go.

drewish’s picture

Status: Needs work » Fixed
FileSize
872 bytes

i'm going to apply the attached patch to HEAD and DRUPAL-5. i think it's a cleaner way to do it. re-open this if it doesn't work for you.

alaa’s picture

Status: Fixed » Needs work

yes much cleaner, but there is a mistake in your patch, you do

 foreach (array('id3v1', 'id3v1') as $format) {
...
}

you need to change the second 'id3v1' to 'id3v2' I suppose.

drewish’s picture

Status: Needs work » Fixed
FileSize
704 bytes

right you are. and i'd even tested that :( committed the attached patch.

yngens’s picture

this works great, except that non-English names contain no links. i.e. they are now displayed correctly, but it is not possible to list all the songs with similar names or performers' names.

second problem is that non-English characters do not display on players (see XSPF Web Music Player - Slim or XSPF Web Music Player)

drewish’s picture

non-English names contain no links. i.e. they are now displayed correctly, but it is not possible to list all the songs with similar names or performers' names.

i'm not sure what you mean? can you elaborate? though i wonder if you ran into a bug i've already fixed... you should make sure you're running the latest release. you may need to re-save those nodes.

sorry, can't do anything about the XSPF player.

yngens’s picture

On a page of an audio-file there are such several categories under the player as: artist, title, album, genre, etc and it is possible to list all the songs of the same artist, genre or of the common song name.

For instance, if an audio file with the name "forever" has this link for the title:

http://www.domain.us/audio/by/title/forever

but a song with a name "Навсегда" (Cyrillic) for the same category (title) has:

http://www.domain.us/audio/by/title/

alaa’s picture

this may be caused by another bug (should have reported it but I was too lazy) the function audio_clean_tag which is used to normalize info like artist name, song title and album name replaces all non latin unicode bytes with underscores.

I had to comment it out in order for audio to work with Arabic letters.

the flash player fails to show unicode char, but that's not a bug in audio module.

yngens’s picture

alaa, what should i exactly need to do in order to get list songs with Cyrillic tags?

drewish’s picture

alaa wrote:

this may be caused by another bug (should have reported it but I was too lazy) the function audio_clean_tag which is used to normalize info like artist name, song title and album name replaces all non latin unicode bytes with underscores.

yeah, i think that's the cause... i already said as much in #6:

though i wonder if you ran into a bug i've already fixed... you should make sure you're running the latest release. you may need to re-save those nodes.

yngens’s picture

drewish, re-saving doesn't help. i did re-save several different nodes for several times. UTF8 names read perfectly, but show empty links.

drewish’s picture

snegny, can you copy the first two lines from your audio.module file for me? it should look something like:

<?php
// $Id: audio.module,v 1.123 2007/08/01 18:51:49 drewish Exp $
yngens’s picture

they are

<?php
// $Id: audio.module,v 1.105.2.10 2007/07/31 03:20:30 drewish Exp $

i downloaded the module just yesterday

yngens’s picture

Status: Fixed » Active

sorry guys, but this has not really be solved for non-English characters. it displays n.E. letter correctly, but links work not correctly. so i am changing status of the thread back to active.

drewish’s picture

marked http://drupal.org/node/185657 as a duplicate

drewish’s picture

marked http://drupal.org/node/186801 as a duplicate

mediafrenzy’s picture

I'm using 5.x-1.3 audio module.

So to fix the iTunes mp3 / ID3 question mark issue I'm having, should I be applying this patch ?

http://drupal.org/node/156476#comment-277431

Or will I have to upgrade further to 5.x-2.x-dev??

drewish’s picture

whoops, i'd marked a bunch of issues as a duplicate of this... it should have been: http://drupal.org/node/145117

Yura Filimonov’s picture

So what's the status on this fix? Does it even work for 5.x-1.4?

Thanks.

I started bugging my hoster because of this =)

drewish’s picture

Status: Active » Needs review
FileSize
783 bytes

here's what I've got in HEAD that seems to be working pretty well. anyone want to give it a try?