Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Unicode

Provides utility methods for UTF-8, UTF-16, UCS-4 (a.k.a. UTF-32), and WTF-8.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Struct
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public struct Unicode

Static Fields

Value

Description

kMaximumValidCodePointThe maximum value of a valid UNICODE code point

Static Properties

Property

Description

BadRuneThe null rune value.
ReplacementCharacterThe Unicode character �.

Static Methods

Method

Description

IsValidCodePointReturns true if a code point is valid.
NotTrailerReturns true if the byte is not the last byte of a UTF-8 character.
UcsToUtf16Writes a rune to a buffer as a UTF-16 encoded character.
UcsToUtf8Writes a rune to a buffer as a UTF-8 encoded character.
Utf16ToUcsReads a UTF-16 encoded character from a buffer.
Utf16ToUtf8Copies UTF-16 characters from one buffer to another buffer as UTF-8.
Utf8ToUcsReads a UTF-8 encoded character from a buffer.
Utf8ToUtf16Copies UTF-8 characters from one buffer to another as UTF-16.
Utf8ToUtf8Copies UTF-8 characters from one buffer to another.

Structs

Struct

Description

Unicode.RuneRepresentation of a Unicode character as a code point.