[l2h] iso_map()

Shigeharu TAKENO shige at iee.niit.ac.jp
Sat Feb 18 04:10:37 CET 2023


shige 10/28 2019
----------------

I think the perl code of iso_map() in latex2html.pin may be fail:

  10883         $enc =~ /^\&\#(\d{3});$/;
  10884         # numeric character references in html refer to unicode
  10885         # we need to convert this char to an 8-bit character
  10886         if ($1 && ($1<=255)) { $enc = chr($1) }

If the value of the "$enc" doesn't match the pattern in the line
10883 (for example, ""e;", which exists in %iso_8859_1_
character_map), then $1 in the line 10886 may be old value for 
another pattern matching.

I think the following code may be better:

 if ($enc =~ /^\&\#(\d{3});$/ && $1 && $1<=255) { $enc = chr($1) }

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 shige at iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161
+========================================================+


More information about the latex2html mailing list.