From 32b32aa604ebe5731a5b80f1f68ef9201f25ad9d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 29 Oct 2007 09:30:48 +0000 Subject: fix the utf8 madness git-svn-id: svn://tug.org/texlive/trunk@5302 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TeXCatalogue.pm | 6 ++++-- Master/tlpkg/bin/tlpsrc2tlpdb | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm index f94672181ec..6856cde8adc 100644 --- a/Master/tlpkg/TeXLive/TeXCatalogue.pm +++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm @@ -10,6 +10,7 @@ use XML::Parser; use XML::XPath; use XML::XPath::XMLParser; +use Encode; package TeXLive::TeXCatalogue::Entry; @@ -79,7 +80,8 @@ sub beautify{ $txt =~ s/\n/ /g; $txt =~ s/^[[:space:]]*//g; $txt =~ s/[[:space:]][[:space:]]*/ /g; - return($txt); + # turn of the utf8 flag by encoding it to utf8 + return(Encode::encode("utf-8", $txt)); } sub name { @@ -167,7 +169,7 @@ sub initialize { chdir($self->{'location'} . "/entries") || die ("Cannot chdir to TeX Catalogue entries: $!"); # parse all the files foreach (glob("?/*.xml")) { - open(my $io,"<:utf8", "$_") or die "Cannot read $_: $!"; + open(my $io,"<$_") or die "Cannot read $_: $!"; my $tce = TeXLive::TeXCatalogue::Entry->new( 'ioref' => $io ); close($io); $self->{'entries'}{$tce->name} = $tce; diff --git a/Master/tlpkg/bin/tlpsrc2tlpdb b/Master/tlpkg/bin/tlpsrc2tlpdb index 3f31923bf0e..629f692cae7 100755 --- a/Master/tlpkg/bin/tlpsrc2tlpdb +++ b/Master/tlpkg/bin/tlpsrc2tlpdb @@ -96,7 +96,6 @@ sub main local *TLPDB; our $TLPDB = ">$opt_master/texlive.tlpdb"; open (TLPDB) || die "open($TLPDB) failed: $!"; - binmode TLPDB, ":utf8"; $tldb->writeout (*TLPDB); warn "$0: wrote $src_count packages $TLPDB.\n"; } else { -- cgit v1.2.3