Needs work
Project:
FileField Podcaster
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2009 at 13:15 UTC
Updated:
9 Jun 2010 at 12:30 UTC
Swedish characters in id3 artist field makes author tag in podcast feed empty.
Workaround that I got working:
Add following to the top of ffpc_row_plugin_podcast.inc
function unhtmlspecialchars($string)
{
$string = str_replace ( 'å', 'å', $string );
$string = str_replace ( 'Å', 'Å', $string );
$string = str_replace ( 'ä', 'ä', $string );
$string = str_replace ( 'Ä', 'Ä', $string );
$string = str_replace ( 'ö', 'ö', $string );
$string = str_replace ( 'Ö', 'Ö', $string );
$string = str_replace ( 'å', 'å', $string );
$string = str_replace ( 'Å', 'Å', $string );
$string = str_replace ( 'ä', 'ä', $string );
$string = str_replace ( 'Ä', 'Ä', $string );
$string = str_replace ( 'ö', 'ö', $string );
$string = str_replace ( 'Ö', 'Ö', $string );
return $string;
} Search for:
'value' => $info['tags_html']['id3v2']['artist'][0], and replace the line with:
'value' => unhtmlspecialchars($info['tags_html']['id3v2']['artist'][0]),
Maybe there is an better solution?
Comments
Comment #1
Nimo commentedTypo. You should search for $info['tags'] and replace with $info['tags_html'].
Ie:
Search for:
Maybe there is an better solution?
and replace the line with:
Correct function to add:
And for some reason my html-entities above got lost and was transformed into real characters - how to write them correctly?
(In the meanwhile replace & with &)
Comment #2
mfer commentedThis definitely needs work. The code listed here isn't really compatible with internationalization. This may be an issue with getID3 or our use of it.
Comment #3
mfer commentedComment #4
renoproc commentedOh ! Didn't see this issue before... perhaps the swedish characters problems is the same as mine :
http://drupal.org/node/822584