summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TeXCatalogue.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-10-29 09:30:48 +0000
committerNorbert Preining <preining@logic.at>2007-10-29 09:30:48 +0000
commit32b32aa604ebe5731a5b80f1f68ef9201f25ad9d (patch)
tree846d9f52c34024e7327324bb6226caf80d0f79d5 /Master/tlpkg/TeXLive/TeXCatalogue.pm
parentdee55c4eb07e529b60398a4840318dc01ef4341c (diff)
fix the utf8 madness
git-svn-id: svn://tug.org/texlive/trunk@5302 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TeXCatalogue.pm')
-rw-r--r--Master/tlpkg/TeXLive/TeXCatalogue.pm6
1 files changed, 4 insertions, 2 deletions
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;