summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TeXCatalogue.pm
diff options
context:
space:
mode:
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;