[Bioperl-l] Bio::Graphics::Panel and utf-8 chars in labels

Adam Sjøgren adsj at novozymes.com
Mon Jun 7 11:04:44 EDT 2010

Does an easy way exist to use unicode/utf-8 characters in labels on
tracks with Bio::Graphics::Panel?

A script like this:

= = =

use strict;
use warnings;

use utf8;

use Bio::Graphics::Panel;
use Bio::SeqFeature::Generic;
use File::Slurp;

my $label='α-glucosidase';

my $panel=Bio::Graphics::Panel->new(-width=>400, -length=>200);
my $feature=Bio::SeqFeature::Generic->new(-start=>1, -end=>100, -primary_tag=>'source');
$panel->add_track($feature, -label=>$label);

write_file('panel.png', $panel->png);
= = =

Gives me a panel.png that very much looks like the label was interpreted
as something like, say, latin1, which makes sense from a quick search in
the GD pod - it refers to stringFT() for using unicode characters, and a
quick ack for stringFT() in Bio/Graphics/ only shows hits in

This makes me guess the answer is no, but I thought I'd ask anyway, in
case I overlooked something.

  Best regards,


                                                          Adam Sjøgren
                                                    adsj at novozymes.com

More information about the Bioperl-l mailing list