Subject: | Malformed UTF-8 character (unexpected non-continuation byte 0x00, immediately after start byte 0xff) in print |
Malformed UTF-8 character (unexpected non-continuation byte 0x00, immediately after start byte 0xff) in print at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 664.
Add Carp::Always:
Malformed UTF-8 character (unexpected non-continuation byte 0x00, immediately after start byte 0xff) in print at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 664.
GraphViz2::try {...} () called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/Try/Tiny.pm line 81
eval {...} called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/Try/Tiny.pm line 72
Try::Tiny::try('CODE(0x2782640)', 'Try::Tiny::Catch=REF(0x2782be0)') called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 673
GraphViz2::run('GraphViz2=HASH(0x1980ef8)', 'driver', 'dot', 'format', 'png', 'output_file', 'layout/self_structure.png', 'verbose', 1, ...) called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 675.
GraphViz2::run('GraphViz2=HASH(0x1980ef8)', 'driver', 'dot', 'format', 'png', 'output_file', 'layout/self_structure.png', 'verbose', 1, ...) called at /home/kent/bin/self_structure_2.pl line 261
I suspect its trying to handle a PNG Image bytestream under the assumption its UTF8.
If I remove the call I make to $g->run( ... format => png => ... )
Then it stops failing.
Additionally, if I generate the image from the canonicalized dot file manually:
xxd png..png | grep ff00
0000020: 1500 0000 0662 4b47 4400 ff00 ff00 ffa0 .....bKGD....... <--- suspect bytes found
000ff00: 86ec 17f6 f54e 2a8e 9d06 7f8a 8cb4 e4f5 .....N*.........
0015680: ff00 0000 0025 8499 3300 2a14 634c f685 .....%..3.*.cL..
And if I simply change the format to a non-binary file output type, ie: svg, that also makes the problem go away.
Add Carp::Always:
Malformed UTF-8 character (unexpected non-continuation byte 0x00, immediately after start byte 0xff) in print at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 664.
GraphViz2::try {...} () called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/Try/Tiny.pm line 81
eval {...} called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/Try/Tiny.pm line 72
Try::Tiny::try('CODE(0x2782640)', 'Try::Tiny::Catch=REF(0x2782be0)') called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 673
GraphViz2::run('GraphViz2=HASH(0x1980ef8)', 'driver', 'dot', 'format', 'png', 'output_file', 'layout/self_structure.png', 'verbose', 1, ...) called at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/GraphViz2.pm line 675.
GraphViz2::run('GraphViz2=HASH(0x1980ef8)', 'driver', 'dot', 'format', 'png', 'output_file', 'layout/self_structure.png', 'verbose', 1, ...) called at /home/kent/bin/self_structure_2.pl line 261
I suspect its trying to handle a PNG Image bytestream under the assumption its UTF8.
If I remove the call I make to $g->run( ... format => png => ... )
Then it stops failing.
Additionally, if I generate the image from the canonicalized dot file manually:
xxd png..png | grep ff00
0000020: 1500 0000 0662 4b47 4400 ff00 ff00 ffa0 .....bKGD....... <--- suspect bytes found
000ff00: 86ec 17f6 f54e 2a8e 9d06 7f8a 8cb4 e4f5 .....N*.........
0015680: ff00 0000 0025 8499 3300 2a14 634c f685 .....%..3.*.cL..
And if I simply change the format to a non-binary file output type, ie: svg, that also makes the problem go away.