# Unicode

> Provides utility methods for UTF-8, UTF-16, UCS-4 (a.k.a. UTF-32), and WTF-8.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public struct Unicode
```

## Static Fields

| Value                                                                                                         | Description                                     |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| [kMaximumValidCodePoint](/engine/6000.7/script-reference/unity/collections/unicode/kmaximumvalidcodepoint.md) | The maximum value of a valid UNICODE code point |

## Static Properties

| Property                                                                                                  | Description              |
| --------------------------------------------------------------------------------------------------------- | ------------------------ |
| [BadRune](/engine/6000.7/script-reference/unity/collections/unicode/badrune.md)                           | The null rune value.     |
| [ReplacementCharacter](/engine/6000.7/script-reference/unity/collections/unicode/replacementcharacter.md) | The Unicode character �. |

## Static Methods

| Method                                                                                            | Description                                                          |
| ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [IsValidCodePoint](/engine/6000.7/script-reference/unity/collections/unicode/isvalidcodepoint.md) | Returns true if a code point is valid.                               |
| [NotTrailer](/engine/6000.7/script-reference/unity/collections/unicode/nottrailer.md)             | Returns true if the byte is not the last byte of a UTF-8 character.  |
| [UcsToUtf16](/engine/6000.7/script-reference/unity/collections/unicode/ucstoutf16.md)             | Writes a rune to a buffer as a UTF-16 encoded character.             |
| [UcsToUtf8](/engine/6000.7/script-reference/unity/collections/unicode/ucstoutf8.md)               | Writes a rune to a buffer as a UTF-8 encoded character.              |
| [Utf16ToUcs](/engine/6000.7/script-reference/unity/collections/unicode/utf16toucs.md)             | Reads a UTF-16 encoded character from a buffer.                      |
| [Utf16ToUtf8](/engine/6000.7/script-reference/unity/collections/unicode/utf16toutf8.md)           | Copies UTF-16 characters from one buffer to another buffer as UTF-8. |
| [Utf8ToUcs](/engine/6000.7/script-reference/unity/collections/unicode/utf8toucs.md)               | Reads a UTF-8 encoded character from a buffer.                       |
| [Utf8ToUtf16](/engine/6000.7/script-reference/unity/collections/unicode/utf8toutf16.md)           | Copies UTF-8 characters from one buffer to another as UTF-16.        |
| [Utf8ToUtf8](/engine/6000.7/script-reference/unity/collections/unicode/utf8toutf8.md)             | Copies UTF-8 characters from one buffer to another.                  |

## Structs

| Struct                                                                            | Description                                            |
| --------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [Unicode.Rune](/engine/6000.7/script-reference/unity/collections/unicode/rune.md) | Representation of a Unicode character as a code point. |
