r15424 - in /trunk/libxml-dom-perl/debian: changelog control patches/ patches/output_encoding.patch patches/series rules
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Fri Feb 22 16:51:32 UTC 2008
Author: gregoa-guest
Date: Fri Feb 22 16:51:31 2008
New Revision: 15424
URL: http://svn.debian.org/wsvn/?sc=1&rev=15424
Log:
TODO: could someone with more knowledge of encodings and XML please check
the new patch?
* Add patch output_encoding.patch; encode output for printToFile() and
toString() in encoding from xml declaration (closes: #324882).
Added:
trunk/libxml-dom-perl/debian/patches/
trunk/libxml-dom-perl/debian/patches/output_encoding.patch
trunk/libxml-dom-perl/debian/patches/series
Modified:
trunk/libxml-dom-perl/debian/changelog
trunk/libxml-dom-perl/debian/control
trunk/libxml-dom-perl/debian/rules
Modified: trunk/libxml-dom-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libxml-dom-perl/debian/changelog?rev=15424&op=diff
==============================================================================
--- trunk/libxml-dom-perl/debian/changelog (original)
+++ trunk/libxml-dom-perl/debian/changelog Fri Feb 22 16:51:31 2008
@@ -1,9 +1,14 @@
libxml-dom-perl (1.44-2) UNRELEASED; urgency=low
+ TODO: could someone with more knowledge of encodings and XML please check
+ the new patch?
+
* Drop patch 01-fix_utf8_tests.patch (not needed anymore) and quilt
framework.
+ * Add patch output_encoding.patch; encode output for printToFile() and
+ toString() in encoding from xml declaration (closes: #324882).
- -- gregor herrmann <gregor+debian at comodo.priv.at> Fri, 22 Feb 2008 15:42:48 +0100
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Fri, 22 Feb 2008 17:48:45 +0100
libxml-dom-perl (1.44-1) unstable; urgency=low
Modified: trunk/libxml-dom-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libxml-dom-perl/debian/control?rev=15424&op=diff
==============================================================================
--- trunk/libxml-dom-perl/debian/control (original)
+++ trunk/libxml-dom-perl/debian/control Fri Feb 22 16:51:31 2008
@@ -5,7 +5,7 @@
Uploaders: Jay Bonci <jaybonci at debian.org>,
gregor herrmann <gregor+debian at comodo.priv.at>
Standards-Version: 3.7.3
-Build-Depends: debhelper (>=6)
+Build-Depends: debhelper (>=6), quilt
Build-Depends-Indep: perl, libwww-perl, libxml-parser-perl (>= 2.34), libxml-perl, libxml-regexp-perl
Homepage: http://search.cpan.org/dist/XML-DOM/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libxml-dom-perl/
Added: trunk/libxml-dom-perl/debian/patches/output_encoding.patch
URL: http://svn.debian.org/wsvn/trunk/libxml-dom-perl/debian/patches/output_encoding.patch?rev=15424&op=file
==============================================================================
--- trunk/libxml-dom-perl/debian/patches/output_encoding.patch (added)
+++ trunk/libxml-dom-perl/debian/patches/output_encoding.patch Fri Feb 22 16:51:31 2008
@@ -1,0 +1,44 @@
+--- libxml-dom-perl.orig/lib/XML/DOM.pm
++++ libxml-dom-perl/lib/XML/DOM.pm
+@@ -35,6 +35,7 @@
+ );
+ use Carp;
+ use XML::RegExp;
++use Encode;
+
+ BEGIN
+ {
+@@ -485,8 +486,8 @@
+
+ sub toString
+ {
+- my $self = shift;
+- $$self;
++ my ($self, $encoding) = @_;
++ Encode::encode($encoding, $$self);
+ }
+
+ sub reset
+@@ -1193,10 +1194,11 @@
+ sub toString
+ {
+ my $self = shift;
++ my $encoding = $self->getXMLDecl()->getEncoding();
+ my $pr = $XML::DOM::PrintToString::Singleton;
+ $pr->reset;
+ $self->print ($pr);
+- $pr->toString;
++ $pr->toString($encoding);
+ }
+
+ sub to_sax
+@@ -1218,7 +1220,8 @@
+ sub printToFile
+ {
+ my ($self, $fileName) = @_;
+- my $fh = new FileHandle ($fileName, "w") ||
++ my $encoding = $self->getXMLDecl()->getEncoding();
++ my $fh = new FileHandle ($fileName, ">:encoding($encoding)") ||
+ croak "printToFile - can't open output file $fileName";
+
+ $self->print ($fh);
Added: trunk/libxml-dom-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libxml-dom-perl/debian/patches/series?rev=15424&op=file
==============================================================================
--- trunk/libxml-dom-perl/debian/patches/series (added)
+++ trunk/libxml-dom-perl/debian/patches/series Fri Feb 22 16:51:31 2008
@@ -1,0 +1,1 @@
+output_encoding.patch
Modified: trunk/libxml-dom-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libxml-dom-perl/debian/rules?rev=15424&op=diff
==============================================================================
--- trunk/libxml-dom-perl/debian/rules (original)
+++ trunk/libxml-dom-perl/debian/rules Fri Feb 22 16:51:31 2008
@@ -11,15 +11,17 @@
PERL = /usr/bin/perl
endif
+include /usr/share/quilt/quilt.make
+
build: build-stamp
-build-stamp:
+build-stamp: $(QUILT_STAMPFN)
dh_testdir
$(PERL) Makefile.PL verbose INSTALLDIRS=vendor
$(MAKE)
$(MAKE) test
touch $@
-clean:
+clean: unpatch
dh_testdir
dh_testroot
dh_clean build-stamp install-stamp Makefile.old
More information about the Pkg-perl-cvs-commits
mailing list