Unicorn Library: Core Definitions

Unicode library for C++ by Ross Smith

This module provides some common definitions used throughout the library.

Contents

Imports

Everything in the Prion library is imported.

Exceptions

An abstract base class for internal errors that may happen while loading the Unicode tables used by certain functions. Functions that can throw exceptions derived from this are individually documented.

An exception thrown to indicate a text encoding error encountered when converting a string from one encoding to another, or when checking an encoded string for validity. The offset of the offending data within the source string (when available) can be retrieved through the offset() method. If possible, a hexadecimal representation of the offending data will be included in the error message.

Basic character types

Defined if the operating system's native API uses wide character strings (this is currently defined only for native Windows builds).

One of these is defined to indicate which UTF encoding the system's wstring class uses.

The value flag is true if C is one of the character types recognized by the Unicorn library (char, char16_t, char32_t, or wchar_t).

These are the character and string types used in the operating system's native ABI.

These are defined to match the UTF encoding of the system's wstring class.

Version information

These return the version of the Unicorn library and the supported version of the Unicode standard.