<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_utf8_from_unichar">
  <info>
    <link type="guide" xref="bson_string_t" group="function"/>
  </info>
  <title>bson_utf8_from_unichar()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[void
bson_utf8_from_unichar (bson_unichar_t unichar,
                        char           utf8[6],
                        uint32_t      *len);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>unichar</code></p></td><td><p>A <link xref="bson_unichar_t">bson_unichar_t</link>.</p></td></tr>
      <tr><td><p><code>utf8</code></p></td><td><p>A location for the utf8 sequence.</p></td></tr>
      <tr><td><p><code>len</code></p></td><td><p>A location for the number of bytes in the resulting utf8 sequence.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>Converts a single unicode character to a multi-byte UTF-8 sequence. The result is stored in <code>utf8</code> and the number of bytes used in <code>len</code>.</p>
  </section>

</page>
