doc/share/examples/vim/sgml2accents.pl

73 lines
1.1 KiB
Perl
Raw Normal View History

#!/usr/bin/perl
# $FreeBSD$
# Transform SGML notation in Iso-8859-1 accents
while (<>) {
s/&Agrave;/<2F>/g;
s/&Aacute;/<2F>/g;
s/&Acirc;/<2F>/g;
s/&Atilde;/<2F>/g;
s/&Auml;/<2F>/g;
s/&Aring;/<2F>/g;
s/&Aring;/<2F>/g;
s/&AElig;/<2F>/g;
s/&Ccedil;/<2F>/g;
s/&Egrave'/<2F>/g;
s/&Eacute;/<2F>/g;
s/&Ecirc;/<2F>/g;
s/&Euml;/<2F>/g;
s/&Igrave;/<2F>/g;
s/&Iacute;/<2F>/g;
s/&Icirc;/<2F>/g;
s/&Iuml;/<2F>/g;
s/&ETH;/<2F>/g;
s/&Ntilde;/<2F>/g;
s/&Ograve;/<2F>/g;
s/&Oacute;/<2F>/g;
s/&Ocirc;/<2F>/g;
s/&Otilde;/<2F>/g;
s/&Ouml;/<2F>/g;
s/&times;/<2F>/g;
s/&Oslash;/<2F>/g;
s/&Ugrave;/<2F>/g;
s/&Uacute;/<2F>/g;
s/&Ucirc;/<2F>/g;
s/&Uuml;/<2F>/g;
s/&Yacute;/<2F>/g;
s/&THORN;/<2F>/g;
s/&szlig;/<2F>/g;
s/&agrave;/<2F>/g;
s/&aacute;/<2F>/g;
s/&acirc;/<2F>/g;
s/&atilde;/<2F>/g;
s/&auml;/<2F>/g;
s/&aring;/<2F>/g;
s/&aring;/<2F>/g;
s/&aelig;/<2F>/g;
s/&ccedil;/<2F>/g;
s/&egrave;/<2F>/g;
s/&eacute;/<2F>/g;
s/&ecirc;/<2F>/g;
s/&euml;/<2F>/g;
s/&igrave;/<2F>/g;
s/&iacute;/<2F>/g;
s/&icirc;/<2F>/g;
s/&iuml;/<2F>/g;
s/&eth;/<2F>/g;
s/&ntilde;/<2F>/g;
s/&ograve;/<2F>/g;
s/&oacute;/<2F>/g;
s/&ocirc;/<2F>/g;
s/&otilde;/<2F>/g;
s/&ouml;/<2F>/g;
s/&divide;/<2F>/g;
s/&oslash;/<2F>/g;
s/&ugrave;/<2F>/g;
s/&uacute;/<2F>/g;
s/&ucirc;/<2F>/g;
s/&uuml;/<2F>/g;
s/&yacute;/<2F>/g;
s/&thorn;/<2F>/g;
s/&yuml;/<2F>/g;
print;
}