summaryrefslogtreecommitdiff
path: root/pod/pod2latex.PL
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-07-04 01:50:18 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-07-04 01:50:18 +0000
commit18b0293d6bd44580fa162d92218c33f9d9672066 (patch)
treec8de939b68cf7636b2ca9e2fb31ebe32a46239b9 /pod/pod2latex.PL
parent347a6e9122479579acd85b56a9ef411f7145d7f5 (diff)
downloadperl-18b0293d6bd44580fa162d92218c33f9d9672066.tar.gz
Handle characters with high bit set
Diffstat (limited to 'pod/pod2latex.PL')
-rw-r--r--pod/pod2latex.PL14
1 files changed, 8 insertions, 6 deletions
diff --git a/pod/pod2latex.PL b/pod/pod2latex.PL
index 34b1faadba..602364e2ec 100644
--- a/pod/pod2latex.PL
+++ b/pod/pod2latex.PL
@@ -500,9 +500,8 @@ sub noremap {
}
sub init_noremap {
- if ( /[\200-\377]/ ) {
- warn "hit bit char in input stream";
- }
+ # escape high bit characters in input stream
+ s/([\200-\377])/"E<".ord($1).">"/ge;
}
sub clear_noremap {
@@ -513,11 +512,14 @@ sub clear_noremap {
sub expand_HTML_escapes {
local($s) = $_[0];
- $s =~ s { E<([A-Za-z]+)> }
+ $s =~ s { E<((\d+)|([A-Za-z]+))> }
{
do {
- exists $HTML_Escapes{$1}
- ? do { $HTML_Escapes{$1} }
+ defined($2)
+ ? do { chr($2) }
+ :
+ exists $HTML_Escapes{$3}
+ ? do { $HTML_Escapes{$3} }
: do {
warn "Unknown escape: $& in $_";
"E<$1>";