blob: b095f7a7cfcc9048eec26bd7bdf7d48909ed5752 [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>encode</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Apache Rivet 3.1"><link rel="up" href="entities.html" title="RivetEntities"><link rel="prev" href="entities.html" title="RivetEntities"><link rel="next" href="decode.html" title="decode"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">encode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="entities.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">RivetEntities</th><td width="20%" align="right"> <a accesskey="n" href="decode.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry"><a name="encode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>encode —
encode a string replacing every occurrence of characters for
which an SGML entity exists
</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::encode</span> <span style="font-family:monospace; font-weight: bold;">string</span> ?<span style="font-family:monospace; font-weight: bold;">-encoding <em class="replaceable"><code>&lt;encoding&gt;</code></em></span>?</div></div></div><div class="refsect1"><a name="idm4152"></a><h2>Description</h2><p style="width:90%">
<span style="font-family:monospace"><span class="command"><strong>::rivet::encode</strong></span></span> returns a copy of the input string
after replacing every occurence of characters for which an SGML entity
exists. By default the command assumes the string is encoded in UTF-8,
other encodings are supported by passing the
<span style="font-family:monospace"><span class="command"><strong>-encoding &lt;encoding&gt;</strong></span></span> argument. The list of
available encodings is returned by command
</p><pre class="programlisting">encoding names</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="entities.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="entities.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="decode.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">RivetEntities </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> decode</td></tr></table></div></body></html>