diff options
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TeXCatalogue.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm index a634e4d69bc..ad9d83c0ac6 100644 --- a/Master/tlpkg/TeXLive/TeXCatalogue.pm +++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm @@ -10,7 +10,7 @@ use XML::Parser; use XML::XPath; use XML::XPath::XMLParser; -use Encode; +use Text::Unidecode; package TeXLive::TeXCatalogue::Entry; @@ -78,7 +78,9 @@ sub initialize { my $docset = $parser->find('/entry/documentation'); foreach my $node ($docset->get_nodelist) { my $docfile = $parser->find('./@href',$node); - my $details = $parser->find('./@details',$node); + # see comments at end of beautify() + my $details = Text::Unidecode::unidecode( + $parser->find('./@details',$node)); my $language = $parser->find('./@language',$node); $self->{'docs'}{$docfile}{'available'} = 1; if ($details) { $self->{'docs'}{$docfile}{'details'} = $details; } @@ -91,8 +93,9 @@ sub beautify{ $txt =~ s/\n/ /g; $txt =~ s/^[[:space:]]*//g; $txt =~ s/[[:space:]][[:space:]]*/ /g; - # turn of the utf8 flag by encoding it to utf8 - return(Encode::encode("utf-8", $txt)); + # transliterate to ascii: it allows the final tlpdb to be pure ascii, + # avoiding problems since we don't control the user's terminal encoding + return(Text::Unidecode::unidecode($txt)); } sub name { |