[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Re: HTML::Entities on the Mac



At 16:34 1997-6-29 +0200, Michael Schuerig wrote:
>At 0:04 Uhr +0200 28.06.1997, Michael Schuerig wrote:
>
>>HTML::Entities (from LWP) converts between HTML entities and ISO-8859/1.
>>Unfortunately the Mac and ISO charsets diverge. Has anyone adapted the
>>module to the Mac charset already or are there good reasons not to do this?
>
>I've converted most of HTML::Entities, but got stuck with the following:
>
>ETH, THORN, Yacute, eth, thorn, iexcl, curren, ordf, shy, macr, sup1, sup2,
>sup3, ordm

The connection between ISO-8859/1 and HTML character entities is not an
arbitrary one.  Alternatively for named characters, entities may define a
character through a three-digit numerical value in the form &#nnn; that
directly represents its ISO code.  Some common characters such as the em
dash that do not have a named equivalent will always appear in the numeric
form.

If an adaption of HTML::Entities would have to include ISO -> Mac character
translation anyway, why deal with named entities separately?  I suggest you
use HTML::Entities as is and subsequently do an ISO -> Mac translation. 
Olav Brinkmann's "MIDex" BBEdit extension, for example, contains
translation tables that would be well worth the effort to be made into a
Perl module.  Or is there such a module?

Gero Herrmann
University of Electro-Communications
Tokyo, Japan


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch