bson_utf8_validate (3) - Linux Manuals
bson_utf8_validate: Validates that the content within utf8 is valid UTF-8. If allow_null is true, then embedded NULL bytes are allowed ( ).
Command to display bson_utf8_validate
manual in Linux: $ man 3 bson_utf8_validate
NAME
bson_utf8_validate() - Validates that the content within utf8 is valid UTF-8. If allow_null is true, then embedded NULL bytes are allowed (
).
SYNOPSIS
bool
bson_utf8_validate (const char *utf8,
size_t utf8_len,
bool allow_null);
PARAMETERS
- utf8
-
A string to verify.
- utf8_len
-
The length of
utf8
in bytes.
- allow_null
-
A bool indicating that embedded
\0
bytes are allowed.
DESCRIPTION
Validates that the content within
utf8
is valid UTF-8. If
allow_null
is
true
, then embedded NULL bytes are allowed (
\0
).
RETURNS
true if
utf8
contains valid UTF-8.
COLOPHON
This page is part of libbson.
Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
Pages related to bson_utf8_validate
- bson_utf8_escape_for_json (3) - Escapes the string utf8 to be placed inside of a JSON string.
- bson_utf8_from_unichar (3) - 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.
- bson_utf8_get_char (3) - Converts the current character in a UTF-8 sequence to a bson_unichar_t, the 32-bit representation of the multi-byte character.
- bson_utf8_next_char (3) - Advances within utf8 to the next UTF-8 character, which may be multiple bytes offset from utf8. A pointer to the next character is returned.
- bson_uint32_to_string (3) - Converts value to a string.
- bson_unichar_t (3) - Unicode Character Abstraction
- bson_append_array (3) - The bson_append_array() function shall append child to bson using the specified key. The type of the field will be an array, but it is the responsibility of the caller to ensure that the keys of child are properly formatted with string keys such as "0", "1", "2" and so forth.
- bson_append_array_begin (3) - The bson_append_array_begin() function shall begin appending an array field to bson. This allows for incrementally building a sub-array. Doing so will generally yield better performance as you will serialize to a single buffer. When done building the sub-array, the caller MUST call bson_append_array_end().
- bson_append_array_end (3) - The bson_append_array_end() function shall complete the appending of an array field started with bson_append_array_begin(). child is invalid after calling this function.