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."
Calling logger() with unicode characters results in "Wide character in print ...
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
3.1
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: PnT DevOps Devs
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 15:24 EDT by Stephen Gordon
Modified: 2014-12-22 09:45 EST (History)
3 users (show)

See Also:
Fixed In Version: 4.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-18 21:46:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Stephen Gordon 2013-08-12 15:24:17 EDT
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 00:40:47 EDT
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 08:25:28 EDT
(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.