The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.




A subclass of MathML::Entities that supplies ASCII approximate characters for XHTML+MathML Named Entities.

  use lib (getpwnam('sdadmin'))[7] . '/perlib';
  use MathML::Entities::Approximate;

  $html    = '<strong>avanc&eacute;e</strong>';

  # convert to HTML character reference. Standard MathML::Entities
  $numeric = name2numbered($html)    # <strong>avanc&#x000E9;e</strong>

  # convert to standard ASCII
  $ascii   = name2approximated($html) # <strong>avancee</strong>


MathML::Entities::Approximated is a content conversion filter for named XHTML+MathML entities. There are over two thousand named entities in the XHTML+MathML DTD, but only a fraction of them are variants on standard ASCII characters.

Named Entities are converted to a reasonable ASCII (7-bit ASCII set), or removed from the string.


There is only one function, which is exported by default.

  • name2approximated

    XHTML+MathML named entities in the argument of name2approximated() are replaced by the corresponding 7-bit ASCII character. Any entitiy which cannot be approximated is removed.


Ian Stuart <<gt>E


Copyright (c) 2005 Ian Stuart. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


MathML::Entities, HTML::Entities, HTML::Entities::Numbered,,

1 POD Error

The following errors were encountered while parsing the POD:

Around line 277:

You forgot a '=back' before '=head1'