|
#1
|
|||
|
|||
|
When scrolling the the available AlienBBC streams on my SB2, non-English streams are fairly unreadable (even to a Gaelic speaker!) as the stream title contains HTML entities and not the correctly accented characters. As an example, try navigating to:
Internet Radio -> AlienBBC -> Radio nan Gaidheal then while scrolling through the list of streams - you will see: Èist beò A' mire ri M& #242;r Caithream Ci& #249;il etc. I'm not sure if this is a problem with AlienBBC, or a general User Interface problem with the Squeezebox. Can it be fixed? Or I may have to complain to my local MP about regional discrimination!
|
|
#2
|
|||
|
|||
|
I have just had a look at this and I think it displays ok in my browser. The first title is: ÈIST BEÒ without any #xx; bits. What browser are you using?
Neil |
|
#3
|
|||
|
|||
|
Hi Neil
Browsers are fine - I'm using Firefox 1.5 - however the issue is with the actual display on the squeezebox itself, in my case an SB2. I'm not sure if this is a general display issue with accented characters, or if perhaps AlienBBC is incorrectly formatting the display string that is passed to the SB for display? |
|
#4
|
|||
|
|||
|
Sorry I didn't read your post properlybut now I see what you mean. The code simply displays what the BBC displays and as this is web friendly you see the strange chars on the SB. I'll see if there is something we can do to fix this.
Neil |
|
#5
|
|||
|
|||
|
Fantastic - many thanks!
|
|
#6
|
|||
|
|||
|
I have a fix for you. I you don't mind hacking could you try it. In the Plugins\Alien folder, edit the Plugin.pm file. Locate the code "sub lines" and then just before the final "return $parts;" insert for following:
Code:
# Convert &xxx;and &#xxx; items to the correct character for display on the SB
$parts->{line1} = HTML::Entities::decode_entities($parts->{line1});
$parts->{line2} = HTML::Entities::decode_entities($parts->{line2});
Code:
#
# Player display function
#
sub lines
{
my $client = shift;
my $parts;
if (defined $refreshing{$client} && $refreshing{$client} )
{
$parts->{line1} = '';
$parts->{line2} = '';
return $parts;
}
my $num_items = $current_menu{$client}->get_num_items();
if ($num_items == 1)
{
$parts->{line1} = $current_menu{$client}->title();
}
else
{
$parts->{line1} = $current_menu{$client}->title() . " (" . ($current_line{$client}+1) . "/" . $num_items .")";
}
if ($num_items > 0)
{
my $item = $current_menu{$client}->get_item($current_line{$client});
$parts->{line2} = $item->get_text();
if ($item->has_children())
{
$parts->{overlay2} = $client->symbols(Slim::Display::Display::symbol('rightarrow'));
}
elsif ($item->is_playable())
{
$parts->{overlay2} = $client->symbols(Slim::Display::Display::symbol('notesymbol'));
}
}
else
{
$parts->{line2} = Slim::Utils::Strings::string('PLUGIN_ALIENBBC_NO_ITEMS');
}
# Convert &xxx;and &#xxx; items to the correct character for display on the SB
$parts->{line1} = HTML::Entities::decode_entities($parts->{line1});
$parts->{line2} = HTML::Entities::decode_entities($parts->{line2});
return $parts;
}
|
|
#7
|
|||
|
|||
|
Neil - your patch works perfectly! That's fixed the problem for me, very much appreciated.
|
|
#8
|
|||
|
|||
|
I'll make this patch part of future releases.
|
|
#9
|
|||
|
|||
|
Actually I spoke too soon... the accented character problem is definately fixed when scrolling through the available streams, but the problem returns when a stream starts to play - the accented characters are displayed as HTML entities in "Now Playing".
There is a point in "%functions" at line 388 (v1.00) which may benefit from the addition of entity translation: Code:
# my $name = $menu_item->get_text();
my $name = HTML::Entities::decode_entities($menu_item->get_text());
# my $line2 = ($client->linesPerScreen() == 1) ? undef : lines($client)->{line2};
my $line2 = ($client->linesPerScreen() == 1) ? undef : HTML::Entities::decode_entities(lines($client)->{line2});
$client->showBriefly(Slim::Utils::Strings::string('PLUGIN_ALIENBBC_CONNECTING'), $line2, 10);
|
|
#10
|
|||
|
|||
|
I can't find a simple solution to this but I am still looking.
Neil |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -7. The time now is 20:41.





Linear Mode

