+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 <huggie@earth.li> Mon, 16 Jun 2008 22:08:25 +0100
+
htag (0.0.23-2) unstable; urgency=low
* Add (no-op) Binary-Arch target. (closes: #395602)
Source: htag
-Maintainer: Jonathan McDowell <noodles@earth.li>
+Maintainer: Simon Huggins <huggie@earth.li>
+Uploaders: Jonathan McDowell <noodles@earth.li>
Priority: optional
Section: mail
-Standards-Version: 3.7.2.2
+Standards-Version: 3.8.0.1
Build-Depends: debhelper
Build-Depends-Indep: perl5
It can be obtained from http://www.earth.li/projectpurple/progs/htag.html
+Copyright (C) 1999 - 2008 Simon Huggins <huggie@earth.li>
+
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
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
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.
-htag-0.0.23
-18th June 2003
+htag-0.0.24
+22nd May 2008
1. Plugins
==========
-htag.pl 0.0.23
+htag.pl 0.0.24
Simon Huggins <huggie@earth.li>
Description
# 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;
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;
#!/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'}
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($) {
my ($tag,$sig,$newsig);
open(SIG, "<$cfg{'tmpsigfile'}") or htagdie "$0: Could not open $cfg{'tmpsigfile'}: $!\n";
while(<SIG>) {
- $sig .= $_;
+ $sig .= decode($fromcharset, $_);
}
close(SIG);
my $ret = 0;
} else {
open(TAG, "<$cfg{'tmptagfile'}") or htagdie "$1: Could not open $cfg{'tmptagfile'}: $!\n";
while(<TAG>) {
- $tag .= $_;
+ $tag .= decode($fromcharset, $_);
}
close(TAG);
}
$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;