]> matita.cs.unibo.it Git - helm.git/blob - helm/software/share/texmf/unicode/latexout.pl
d61cbe2ccc54bc0738e566d03fa555d9688e22cc
[helm.git] / helm / software / share / texmf / unicode / latexout.pl
1 #! /usr/bin/perl -T -w
2
3 =head1 NAME
4
5 latexout.pl - Filters the LaTeX log and output, so that UTF8 stays UTF8.
6
7 =head1 SYNOPSIS
8
9 latex I<arguments> | latexout.pl
10
11 =head1 DESCRIPTION
12
13 TeX replaces bytes in the range of 0x80 to 0x9F by ^^xx
14 sequences. This filter restores them.
15
16 =head1 BUGS
17
18 Only complete lines are parsed, so when TeX wants input, the prompt is
19 not displayed.
20
21 =head1 AUTHOR
22
23 Dominique Unruh <I<dominique@unruh.de>>.
24
25 =head1 SEE ALSO
26
27 The LaTeX package B<ucs.sty>.
28
29 =cut
30
31 $| = 1;
32
33 while (<>) {
34     s/\^\^([0-9a-f]{2})/chr hex $1/egi;
35     print $_;
36 }