Method: </span><span><code class="def-type"><var class="var">out</var> =</code> <strong class="def-name">encode</strong> <code class="def-code-arguments">(<var class="var">obj</var>, <var class="var">charsetName</var>)</code><a class="copiable-link" href="#index-encode"> &para;</a></span></dt>
<dd>
<p>Encode string in a given character encoding.
</p>
<p><var class="var">obj</var> must be scalar.
</p>
<p><var class="var">charsetName</var> (charvec) is the name of a character encoding.
(TODO: Document what de