Bug 996266 - Calling logger() with unicode characters results in "Wide character in print at /usr/share/perl5/vendor_perl/Publican.pm line 1092, <FH> line 7."
Summary: Calling logger() with unicode characters results in "Wide character in print ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 3.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-12 19:24 UTC by Stephen Gordon
Modified: 2014-12-22 14:45 UTC (History)
3 users (show)

Fixed In Version: 4.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-19 02:46:48 UTC
Embargoed:


Attachments (Terms of Use)
Test book. (91.34 KB, application/gzip)
2013-08-12 19:24 UTC, Stephen Gordon
no flags Details

Description Stephen Gordon 2013-08-12 19:24:17 UTC
Created attachment 785860 [details]
Test book.

Description of problem:

When running publican_print_unused on a book containing images with UTF-8 characters in their file names, and those image files happen to be unused, I receive this error from the logger() subroutine:

Wide character in print at /usr/share/perl5/vendor_perl/Publican.pm line 1092, <FH> line 7.

The file names of the relevant images are however still output correctly - the error isn't fatal. The relevant block of code is:

1086 sub logger {
1087     my ( $msg, $colour ) = @_;
1088
1089     return if ($QUIET);
1090
1091     if ( $colour && !$NOCOLOURS ) {
1092         print( STDOUT $colour, $msg, RESET);
1093     }
1094     else {
1095         print( STDOUT $msg );
1096     }
1097
1098     return;
1099 }

Full output for the attached test book is:

$ publican print_unused_images

List of unused Image files in en-US
Wide character in print at /usr/share/perl5/vendor_perl/Publican.pm line 1092, <FH> line 7.
    images/Flavors-–-TGen-Cloud-Dashboard.png
Wide character in print at /usr/share/perl5/vendor_perl/Publican.pm line 1092, <FH> line 7.
    images/Login-–-OpenStack-Dashboard.png

List of missing Image files in en-US
    Common_Content/images/title_logo.svg

Version-Release number of selected component (if applicable):

publican-3.2.0-0.fc18.noarch

Comment 2 Jeff Fearn 🐞 2013-09-23 04:40:47 UTC
Seems to be working in DEVEL branch.

[jfearn@cranium Users_Guide]$ publican print_unused_images 

DEBUG: Publican: config loaded

List of unused Image files in en-US
    images/drupal_add_user.png
    images/test—image.png

List of missing Image files in en-US
    Common_Content/images/title_logo.svg

Note the f^^^ err... large boned dash in the test image name.

Comment 3 Stephen Gordon 2013-09-24 12:25:28 UTC
(In reply to Jeff Fearn from comment #2)
> Seems to be working in DEVEL branch.
> 
> [jfearn@cranium Users_Guide]$ publican print_unused_images 
> 
> DEBUG: Publican: config loaded
> 
> List of unused Image files in en-US
>     images/drupal_add_user.png
>     images/test—image.png
> 
> List of missing Image files in en-US
>     Common_Content/images/title_logo.svg
> 
> Note the f^^^ err... large boned dash in the test image name.

Ok, I'm still getting it on 3.2.1 but I have to build some RPMs and test the devel stuff anyway... ;)


Note You need to log in before you can comment on or make changes to this bug.