Source

Website Meta Language / src / wml_include / fmt / isolatin.src

##
##  wml::fmt::isolatin - ISO-Latin-1 to HTML Entity Conversion
##  Copyright (c) 1997-2001 Ralf S. Engelschall, All Rights Reserved. 
##

#   the container tag itself
<define-tag isolatin endtag=required>
{:\
    [[s| |&nbsp;|g]]\
    [[s|Ą|&iexcl;|g]]\
    [[s|˘|&cent;|g]]\
    [[s|Ł|&pound;|g]]\
    [[s|¤|&curren;|g]]\
    [[s|Ľ|&yen;|g]]\
    [[s|Ś|&brvbar;|g]]\
    [[s|§|&sect;|g]]\
    [[s|¨|&uml;|g]]\
    [[s|Š|&copy;|g]]\
    [[s|Ş|&ordf;|g]]\
    [[s|Ť|&laquo;|g]]\
    [[s|Ź|&not;|g]]\
    [[s|­|&shy;|g]]\
    [[s|Ž|&reg;|g]]\
    [[s|Ż|&macr;|g]]\
    [[s|°|&deg;|g]]\
    [[s|ą|&plusmn;|g]]\
    [[s|˛|&sup2;|g]]\
    [[s|ł|&sup3;|g]]\
    [[s|´|&acute;|g]]\
    [[s|ľ|&micro;|g]]\
    [[s|ś|&para;|g]]\
    [[s|ˇ|&middot;|g]]\
    [[s|¸|&cedil;|g]]\
    [[s|š|&sup1;|g]]\
    [[s|ş|&ordm;|g]]\
    [[s|ť|&raquo;|g]]\
    [[s|ź|&frac14;|g]]\
    [[s|˝|&frac12;|g]]\
    [[s|ž|&frac34;|g]]\
    [[s|ż|&iquest;|g]]\
    [[s|Ŕ|&Agrave;|g]]\
    [[s|Á|&Aacute;|g]]\
    [[s|Â|&Acirc;|g]]\
    [[s|Ă|&Atilde;|g]]\
    [[s|Ä|&Auml;|g]]\
    [[s|Ĺ|&Aring;|g]]\
    [[s|Ć|&AElig;|g]]\
    [[s|Ç|&Ccedil;|g]]\
    [[s|Č|&Egrave;|g]]\
    [[s|É|&Eacute;|g]]\
    [[s|Ę|&Ecirc;|g]]\
    [[s|Ë|&Euml;|g]]\
    [[s|Ě|&Igrave;|g]]\
    [[s|Í|&Iacute;|g]]\
    [[s|Î|&Icirc;|g]]\
    [[s|Ď|&Iuml;|g]]\
    [[s|Đ|&ETH;|g]]\
    [[s|Ń|&Ntilde;|g]]\
    [[s|Ň|&Ograve;|g]]\
    [[s|Ó|&Oacute;|g]]\
    [[s|Ô|&Ocirc;|g]]\
    [[s|Ő|&Otilde;|g]]\
    [[s|Ö|&Ouml;|g]]\
    [[s|×|&times;|g]]\
    [[s|Ř|&Oslash;|g]]\
    [[s|Ů|&Ugrave;|g]]\
    [[s|Ú|&Uacute;|g]]\
    [[s|Ű|&Ucirc;|g]]\
    [[s|Ü|&Uuml;|g]]\
    [[s|Ý|&Yacute;|g]]\
    [[s|Ţ|&THORN;|g]]\
    [[s|ß|&szlig;|g]]\
    [[s|ŕ|&agrave;|g]]\
    [[s|á|&aacute;|g]]\
    [[s|â|&acirc;|g]]\
    [[s|ă|&atilde;|g]]\
    [[s|ä|&auml;|g]]\
    [[s|ĺ|&aring;|g]]\
    [[s|ć|&aelig;|g]]\
    [[s|ç|&ccedil;|g]]\
    [[s|č|&egrave;|g]]\
    [[s|é|&eacute;|g]]\
    [[s|ę|&ecirc;|g]]\
    [[s|ë|&euml;|g]]\
    [[s|ě|&igrave;|g]]\
    [[s|í|&iacute;|g]]\
    [[s|î|&icirc;|g]]\
    [[s|ď|&iuml;|g]]\
    [[s|đ|&eth;|g]]\
    [[s|ń|&ntilde;|g]]\
    [[s|ň|&ograve;|g]]\
    [[s|ó|&oacute;|g]]\
    [[s|ô|&ocirc;|g]]\
    [[s|ő|&otilde;|g]]\
    [[s|ö|&ouml;|g]]\
    [[s|÷|&divide;|g]]\
    [[s|ř|&oslash;|g]]\
    [[s|ů|&ugrave;|g]]\
    [[s|ú|&uacute;|g]]\
    [[s|ű|&ucirc;|g]]\
    [[s|ü|&uuml;|g]]\
    [[s|ý|&yacute;|g]]\
    [[s|ţ|&thorn;|g]]\
    [[s|˙|&yuml;|g]]\
    %body\
:}\
</define-tag>

#   the "#include ... global" support
<if "$(global)" <group
<isolatin>
{#ISOLATIN_GLOBAL#}
</isolatin>
{#ISOLATIN_GLOBAL#:
/>/>

##EOF##
__END__

=encoding utf8

=head1 NAME

wml::fmt::isolatin - ISO-Latin-1 to HTML Entity Conversion

=head1 SYNOPSIS

  #use wml::fmt::isolatin [global]

  <isolatin>
  Text with ISO latin 1 characters
  for instance german umlauts: ``öäüÖÄÜß''
  </isolatin>

=head1 DESCRIPTION

This creates an area substitution with Pass 6 (asubst) for all ISO-Latin-1
characters to their corresponding HTML entities. Note that this is not really
necessary because HTML 3.2 states that every browser has to understand
ISO-Latin-1 characters. So there is no real need to encode them with this
container tag. But it is safe, because the result is 7Bit which can be
transfered over more mediums then the 8 Bit version with ISO-Latin-1
characters.

When adding the C<global> argument, the complete document gets automatically
encapsulated into a C<E<lt>isolatinE<gt>> container.

=head1 AUTHOR

 Ralf S. Engelschall
 rse@engelschall.com
 www.engelschall.com

=head1 REQUIRES

 Internal: P1, P2, P6
 External: --

=head1 SEEALSO

ISO Latin 1 character table

=cut