---
name: "bson_utf8_from_unichar"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_utf8_from_unichar"
---

# bson\_utf8\_from\_unichar(3)

## SYNOPSIS

```
void
bson_utf8_from_unichar (bson_unichar_t unichar, char utf8[6], uint32_t *len);
```

## PARAMETERS

- •

  **unichar**: A *bson\_unichar\_t*.

- •

  **utf8**: A location for the utf8 sequence.

- •

  **len**: A location for the number of bytes in the resulting utf8 sequence.

## DESCRIPTION

Converts a single unicode character to a multi-byte UTF-8 sequence. The result is stored in **utf8** and the number of bytes used in **len**.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
