From: Simon Huggins Date: Mon, 16 Jun 2008 21:08:25 +0000 (+0100) Subject: Import Debian changes 0.0.24-1 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=7ae641729b9f11a8571387127fb2095cce8eef85;hp=d0fc8c193a3594cac3d83542727a7f1b5646cc2f;p=htag.git Import Debian changes 0.0.24-1 htag (0.0.24-1) unstable; urgency=low * New upstream release - fixes tags in UTF-8 causing formatting issues (closes: #482350) * Takeover package since I'm upstream and now a DD. Thanks to Jonathan McDowell for putting up with me over the years. * Updated to Standards-Version 3.8.0.1. - fix copyright file. - Remove unnecessary INSTALL file. --- diff --git a/debian/changelog b/debian/changelog index 6e85922..59f201a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +htag (0.0.24-1) unstable; urgency=low + + * New upstream release + - fixes tags in UTF-8 causing formatting issues (closes: #482350) + * Takeover package since I'm upstream and now a DD. Thanks to Jonathan + McDowell for putting up with me over the years. + * Updated to Standards-Version 3.8.0.1. + - fix copyright file. + - Remove unnecessary INSTALL file. + + -- Simon Huggins Mon, 16 Jun 2008 22:08:25 +0100 + htag (0.0.23-2) unstable; urgency=low * Add (no-op) Binary-Arch target. (closes: #395602) diff --git a/debian/control b/debian/control index 06dede4..376d99f 100644 --- a/debian/control +++ b/debian/control @@ -1,8 +1,9 @@ Source: htag -Maintainer: Jonathan McDowell +Maintainer: Simon Huggins +Uploaders: Jonathan McDowell Priority: optional Section: mail -Standards-Version: 3.7.2.2 +Standards-Version: 3.8.0.1 Build-Depends: debhelper Build-Depends-Indep: perl5 diff --git a/debian/copyright b/debian/copyright index 12a3ddd..bf0543a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -9,6 +9,8 @@ files. It can be obtained from http://www.earth.li/projectpurple/progs/htag.html +Copyright (C) 1999 - 2008 Simon Huggins + You are free to distribute this software under the terms of the GNU General Public License. The full text of this license can be found in the file /usr/share/common-licenses/GPL diff --git a/debian/rules b/debian/rules index 2d0c13b..f255ea1 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ binary-indep: binary-indep-stamp binary-indep-stamp: install dh_testdir dh_testroot - dh_installdocs docs/AUTHORS docs/BUGS docs/INSTALL \ + dh_installdocs docs/AUTHORS docs/BUGS \ docs/MACRO_DESCRIPTION docs/README \ docs/TODO docs/TROUBLESHOOTING \ docs/URL docs/Changelog.htagplugin diff --git a/docs/Changelog.htag b/docs/Changelog.htag index 83f3557..b75c941 100644 --- a/docs/Changelog.htag +++ b/docs/Changelog.htag @@ -1,6 +1,9 @@ HISTORY +2008-05-22 + Fix 15merge to use Encode and deal with UTF-8 taglines and + signatures correctly. 2003-06-18 Oops, 25asktag always asked for a tag regardless of $cfg{'asktag'} Thanks to Jasper Spaans for pointing that out. diff --git a/docs/INSTALL b/docs/INSTALL index dea01d7..484393f 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -1,5 +1,5 @@ -htag-0.0.23 -18th June 2003 +htag-0.0.24 +22nd May 2008 1. Plugins ========== diff --git a/docs/README b/docs/README index fd09d3e..55c3911 100644 --- a/docs/README +++ b/docs/README @@ -1,4 +1,4 @@ -htag.pl 0.0.23 +htag.pl 0.0.24 Simon Huggins Description diff --git a/htag.pl b/htag.pl index 5972d89..898e88c 100755 --- a/htag.pl +++ b/htag.pl @@ -34,7 +34,7 @@ if ($< == 0 or $> == 0 or $( == 0 or $) == 0) { # HtagPlugin lying around the system then uncomment the following with the # path to your local copy of HtagPlugin -# use lib '/home/huggie/perl/huggietag/htag-0.0.23/HtagPlugin'; +# use lib '/home/huggie/perl/huggietag/htag-0.0.24/HtagPlugin'; use HtagPlugin 0.6; use Getopt::Long; @@ -56,7 +56,7 @@ my $cfgdebug=0; my $infinity = 80; ### Defines -$override{'VERSION'} = $cfg{'VERSION'} = "0.0.23"; +$override{'VERSION'} = $cfg{'VERSION'} = "0.0.24"; $override{'HOME'} = $cfg{'HOME'} = $ENV{"HOME"} || $ENV{"LOGDIR"} || (getpwuid($<))[7]; $cfg{'nicedie'} = 1; diff --git a/plugins/15merge b/plugins/15merge index 801bcf0..53f3b82 100644 --- a/plugins/15merge +++ b/plugins/15merge @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# Copyright (C) 2000-2003 Simon Huggins +# Copyright (C) 2000-2008 Simon Huggins # merge merges the sig and the tag but also merges the sig and the new style # plugin things (i.e. all those silly files in $cfg{'tmpdir'} @@ -20,11 +20,38 @@ use strict; use Text::Wrap; +use Encode; $Text::Wrap::columns=defined $cfg{'maxlinelen'} ? $cfg{'maxlinelen'} : 72; $cfg{'first'} ||= ""; $cfg{'leader'} ||= ""; +# Work out the correct locale to use if there is one otherwise we assume +# UTF-8 which shouldn't kill ascii people and anyone else should have +# correctly set locale. +my $fromcharset = 'UTF-8'; +my $tocharset = 'UTF-8'; + +my @all_encodings = Encode->encodings(":all"); +my $locale; +if (defined $ENV{'LC_ALL'}) { + $locale = $ENV{'LC_ALL'}; +} elsif (defined $ENV{'LC_CTYPE'}) { + $locale = $ENV{'LC_CTYPE'}; +} elsif (defined $ENV{'LANG'}) { + $locale = $ENV{'LANG'}; +} +if ($locale) { + $locale =~ s/.*\.//; + $locale = lc $locale; + foreach (@all_encodings) { + if ($locale eq lc $_) { + $tocharset = $fromcharset = $_; + last; + } + } +} + my $anal_merge_debug=0; sub remove_space($) { @@ -163,7 +190,7 @@ sub getplugin($) { my ($tag,$sig,$newsig); open(SIG, "<$cfg{'tmpsigfile'}") or htagdie "$0: Could not open $cfg{'tmpsigfile'}: $!\n"; while() { - $sig .= $_; + $sig .= decode($fromcharset, $_); } close(SIG); my $ret = 0; @@ -174,7 +201,7 @@ if (grep { /\@NOTAG\@/ } $sig) { } else { open(TAG, "<$cfg{'tmptagfile'}") or htagdie "$1: Could not open $cfg{'tmptagfile'}: $!\n"; while() { - $tag .= $_; + $tag .= decode($fromcharset, $_); } close(TAG); } @@ -187,6 +214,7 @@ if (defined $sig and $sig =~ /@[A-Za-z]?\*|(?:[1-9][0-9]*)[RC]?@/) { $cfg{'notag'} = 0; } if (defined $sig) { + $sig = encode($tocharset, $sig); open(SIG, ">$cfg{'tmpsigfile'}") or htagdie "$0: Could not open $cfg{'tmpsigfile'}: $!\n"; print SIG "\n" while $cfg{'newline'}--; print SIG $sig;