Bug 729972 - Review Request: perl-Test-Mojibake - Check your source for encoding misbehavior
Summary: Review Request: perl-Test-Mojibake - Check your source for encoding misbehavior
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Iain Arnell
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: perl-Test-Version
TreeView+ depends on / blocked
Reported: 2011-08-11 12:37 UTC by Paul Howarth
Modified: 2011-09-15 08:13 UTC (History)
2 users (show)

Fixed In Version: perl-Test-Mojibake-0.3-2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-09-15 08:13:39 UTC
Type: ---
iarnell: fedora-review+
gwync: fedora-cvs+

Attachments (Terms of Use)

Description Paul Howarth 2011-08-11 12:37:47 UTC
Spec URL:


Many modern text editors automatically save files using UTF-8 codification.
However, the perl interpreter does not expect it by default. Whilst this does
not represent a big deal on (most) backend-oriented programs, Web framework
(Catalyst, Mojolicious) based applications will suffer so-called Mojibake
(literally: "unintelligible sequence of characters"). Even worse: if an editor
saves BOM (Byte Order Mark, U+FEFF character in Unicode) at the start of a
script with the executable bit set (on Unix systems), it won't execute at all,
due to shebang corruption.

Avoiding codification problems is quite simple:

 * Always use utf8/use common::sense when saving source as UTF-8
 * Always specify =encoding utf8 when saving POD as UTF-8
 * Do neither of above when saving as ISO-8859-1
 * Never save BOM (not that it's wrong; just avoid it as you'll barely
   notice its presence when in trouble)

However, if you find yourself upgrading old code to use UTF-8 or trying to
standardize a big project with many developers, each one using a different
platform/editor, reviewing all files manually can be quite painful, especially
in cases where some files have multiple encodings (note: it all started when I
realized that gedit and derivatives are unable to open files with character
conversion tables).

Enter the Test::Mojibake ;)

Comment 1 Iain Arnell 2011-08-12 04:20:46 UTC
Koji (success) http://koji.fedoraproject.org/koji/taskinfo?taskID=3267315

Comment 2 Iain Arnell 2011-08-12 04:26:12 UTC
A very nicely documented spec. No issues at all. APPROVED.

koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=3267315

Spec looks sane, clean and consistent; license is correct (GPL+ or Artistic);
make test passes cleanly.

Source tarballs match upstream (sha1sum):
96b654a0b0dd15c6ad327e4e59864bfd9c3c5af5 Test-Mojibake-0.3.tar.gz
96b654a0b0dd15c6ad327e4e59864bfd9c3c5af5 Test-Mojibake-0.3.tar.gz.srpm

Final provides / requires are sane:

======> perl-Test-Mojibake-0.3-2.fc17.noarch.rpm <======
====> rpmlint
perl-Test-Mojibake.noarch: W: spelling-error %description -l en_US backend -> backed, back end, back-end
perl-Test-Mojibake.noarch: W: spelling-error %description -l en_US encodings -> encoding, encoding s, recordings
perl-Test-Mojibake.noarch: W: spelling-error %description -l en_US gedit -> edit, geddit, g edit
perl-Test-Mojibake.noarch: E: incorrect-fsf-address /usr/share/doc/perl-Test-Mojibake-0.3/LICENSE
1 packages and 0 specfiles checked; 1 errors, 3 warnings.
====> provides
perl(Test::Mojibake) = 0.3
perl-Test-Mojibake = 0.3-2.fc17
====> requires
perl >= 0:5.008
====> obsoletes
====> conflicts

======> perl-Test-Mojibake-0.3-2.fc17.src.rpm <======
====> rpmlint
perl-Test-Mojibake.src: W: spelling-error %description -l en_US backend -> backed, back end, back-end
perl-Test-Mojibake.src: W: spelling-error %description -l en_US encodings -> encoding, encoding s, recordings
perl-Test-Mojibake.src: W: spelling-error %description -l en_US gedit -> edit, geddit, g edit
perl-Test-Mojibake.src:66: W: mixed-use-of-spaces-and-tabs (spaces: line 66, tab: line 17)
1 packages and 0 specfiles checked; 0 errors, 4 warnings.
====> provides
====> requires
====> obsoletes
====> conflicts

====> mock install
INFO: mock.py version 1.1.12 starting...
State Changed: init plugins
INFO: selinux enabled
State Changed: start
Mock Version: 1.1.12
INFO: Mock Version: 1.1.12
State Changed: lock buildroot
INFO: installing package(s): perl-Test-Mojibake-0.3-2.fc17.noarch.rpm
INFO: Ignored option -c (probably due to merging -yc != -y -c)

 Package                 Arch   Version           Repository               Size
 perl-Test-Mojibake      noarch 0.3-2.fc17        /perl-Test-Mojibake-0.3-2.fc17.noarch
                                                                           43 k
Installing for dependencies:
 perl-CPAN               noarch 1.9600-185.fc17   fedora                  259 k
 perl-Digest-SHA         x86_64 1:5.61-185.fc17   fedora                   67 k
 perl-ExtUtils-MakeMaker noarch 6.57.5-185.fc17   fedora                  303 k
 perl-ExtUtils-ParseXS   noarch 1:2.2210-185.fc17 fedora                   52 k
 perl-HTTP-Tiny          noarch 0.012-185.fc17    fedora                   40 k
 perl-Test-Harness       noarch 3.23-185.fc17     fedora                  287 k
 perl-Test-Simple        noarch 0.98-185.fc17     fedora                  118 k
 perl-devel              x86_64 4:5.14.1-185.fc17 fedora                  450 k
 python                  x86_64 2.7.2-4.fc16      fedora                   74 k
 systemtap-sdt-devel     x86_64 1.6-1.fc16        fedora                   46 k

Transaction Summary
Install      11 Package(s)

Total size: 1.7 M
Total download size: 1.7 M
Installed size: 4.3 M

  perl-Test-Mojibake.noarch 0:0.3-2.fc17                                        

Dependency Installed:
  perl-CPAN.noarch 0:1.9600-185.fc17                                            
  perl-Digest-SHA.x86_64 1:5.61-185.fc17                                        
  perl-ExtUtils-MakeMaker.noarch 0:6.57.5-185.fc17                              
  perl-ExtUtils-ParseXS.noarch 1:2.2210-185.fc17                                
  perl-HTTP-Tiny.noarch 0:0.012-185.fc17                                        
  perl-Test-Harness.noarch 0:3.23-185.fc17                                      
  perl-Test-Simple.noarch 0:0.98-185.fc17                                       
  perl-devel.x86_64 4:5.14.1-185.fc17                                           
  python.x86_64 0:2.7.2-4.fc16                                                  
  systemtap-sdt-devel.x86_64 0:1.6-1.fc16                                       

State Changed: unlock buildroot
State Changed: end

Comment 3 Paul Howarth 2011-08-12 08:52:17 UTC
New Package SCM Request
Package Name: perl-Test-Mojibake
Short Description: Check your source for encoding misbehavior
Owners: pghmcfc
Branches: EL-4 EL-5 EL-6 F-14 F-15 F-16
InitialCC: perl-sig

Thanks for the review Iain. I'll fix the mixed-use-of-spaces-and-tabs on import.

Comment 4 Iain Arnell 2011-08-12 09:01:42 UTC
> Thanks for the review Iain. I'll fix the mixed-use-of-spaces-and-tabs on
> import.

Well spotted - I lost that in all the "spelling errors". Must remember to tweak my script to make real warnings more obvious.

Comment 5 Gwyn Ciesla 2011-08-12 12:41:28 UTC
Git done (by process-git-requests).

Comment 6 Fedora Update System 2011-08-12 14:53:36 UTC
perl-Test-Mojibake-0.3-2.fc16 has been submitted as an update for Fedora 16.

Comment 7 Paul Howarth 2011-08-12 19:20:20 UTC
Rawhide and F-16 builds done. Others are waiting on perl-Test-DistManifest, which I can't do buildroot overrides for (Bug #672543).

Comment 8 Fedora Update System 2011-08-20 08:12:19 UTC
perl-Test-Mojibake-0.3-2.fc14 has been submitted as an update for Fedora 14.

Comment 9 Fedora Update System 2011-08-20 08:12:27 UTC
perl-Test-Mojibake-0.3-2.fc15 has been submitted as an update for Fedora 15.

Comment 10 Fedora Update System 2011-08-23 20:27:06 UTC
perl-Test-Mojibake-0.3-2.fc16 has been pushed to the Fedora 16 stable repository.

Comment 11 Fedora Update System 2011-08-26 22:43:34 UTC
perl-Test-Mojibake-0.3-2.el5 has been submitted as an update for Fedora EPEL 5.

Comment 12 Fedora Update System 2011-08-26 22:43:42 UTC
perl-Test-Mojibake-0.3-2.el6 has been submitted as an update for Fedora EPEL 6.

Comment 13 Fedora Update System 2011-08-26 22:43:51 UTC
perl-Test-Mojibake-0.3-2.el4 has been submitted as an update for Fedora EPEL 4.

Comment 14 Fedora Update System 2011-09-07 00:02:30 UTC
perl-Test-Mojibake-0.3-2.fc15 has been pushed to the Fedora 15 stable repository.

Comment 15 Fedora Update System 2011-09-07 00:24:40 UTC
perl-Test-Mojibake-0.3-2.fc14 has been pushed to the Fedora 14 stable repository.

Comment 16 Fedora Update System 2011-09-14 00:26:55 UTC
perl-Test-Mojibake-0.3-2.el6 has been pushed to the Fedora EPEL 6 stable repository.

Comment 17 Fedora Update System 2011-09-14 00:27:56 UTC
perl-Test-Mojibake-0.3-2.el4 has been pushed to the Fedora EPEL 4 stable repository.

Comment 18 Fedora Update System 2011-09-14 00:28:39 UTC
perl-Test-Mojibake-0.3-2.el5 has been pushed to the Fedora EPEL 5 stable repository.

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