Man page - xml2asc(1)
Packages contas this manual
- hxname2id(1)
- hxcite(1)
- hxwls(1)
- hxprune(1)
- hxref(1)
- hxextract(1)
- hxmkbib(1)
- hxcopy(1)
- hxmultitoc(1)
- hxpipe(1)
- hxtabletrans(1)
- hxindex(1)
- hxcount(1)
- hxcite-mkbib(1)
- hxxmlns(1)
- hxunent(1)
- hxaddid(1)
- hxincl(1)
- hxnsxml(1)
- hxtoc(1)
- hxunpipe(1)
- asc2xml(1)
- hxnum(1)
- hxuncdata(1)
- hxselect(1)
- hxprintlinks(1)
- hxnormalize(1)
- hxclean(1)
- hxunxmlns(1)
- xml2asc(1)
- hxremove(1)
apt-get install html-xml-utils
Manual
| XML2ASC(1) | HTML-XML-utils | XML2ASC(1) |
NAME
xml2asc - convert UTF-8 to &#nnn; entities
SYNOPSIS
xml2asc
DESCRIPTION
Reads an UTF-8 encoded text from standard input and writes to standard output, converting all non-ASCII characters to &#nnn; entities, so that the result is ASCII-encoded.
One example use is to convert ISO-8859-1 to ASCII with &#nnn; entities, by first running asc2xml to convert ISO-8859-1 to UTF-8 and then pipe the result into xml2asc to convert to ASCII with &#nnn; entities for all accented characters.
To test if a file is correct UTF-8, ignore the output and test the exit code, e.g. in Bash:
xml2asc <myfile >/dev/null && echo "OK" || echo "Fail"
DIAGNOSTICS
xml2asc returns with a non-zero exit code if the input was not UTF-8.
SEE ALSO
asc2xml(1), UTF-8 (RFC 2279)
BUGS
Doesn't distinguish mark-up from content, so if the input uses non-ASCII characters in XML element names, they will be output with numerical entities in them, which is not legal in XML.
| 10 Jul 2011 | 7.x |