UTF-8 Conversion Utilities

Functions

A3DStatus

A3DMiscUTF8ToUnicode

A3DStatus

A3DMiscUnicodeToUTF8

A3DStatus

A3DMiscUTF8ToUTF16

A3DStatus

A3DMiscUTF16ToUTF8

Detailed Description

group a3d_UTF8_utilities

Functions for converting between UTF-8 and UTF-16 strings on Windows.

Function Documentation

A3DStatus A3DMiscUTF8ToUnicode(const A3DUTF8Char *pcInputBuffer, A3DUTF8Char acOutputBuffer[])

Converts UTF-8 encoded characters to UTF-16 strings on Windows.

This function returns a UTF-16 string on Windows.

Version

2.0

You must cast the string to a wide char pointer (wchar_t*) depending on the target computer’s characteristics.

Warning

On Linux, this API simply copies the input A3DUTF8Char* string into the output A3DUTF8Char* string.

Return values:
  • A3D_SUCCESS

  • A3D_INVALID_ENTITY_NULL

  • A3D_INITIALIZE_NOT_CALLED

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DMiscUnicodeToUTF8(const A3DUTF8Char *pcInputBuffer, A3DUTF8Char acOutputBuffer[])

Converts UTF-16 strings to an array UTF-8 encoded characters on Windows.

This function returns an array of UTF-8 encoded characters.

Version

2.0

The input buffer is cast and interpreted as a Unicode string (wchar_t*).

Warning

On Linux, this API simply copies the input A3DUTF8Char* string into the output A3DUTF8Char* string.

Return values:
  • A3D_SUCCESS

  • A3D_INVALID_ENTITY_NULL

  • A3D_INITIALIZE_NOT_CALLED

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DMiscUTF8ToUTF16(const A3DUTF8Char *pcInputBuffer, A3DUniChar acOutputBuffer[])

Converts a UTF-8 string to a UTF-16 string on Windows.

This function returns a UTF-16 string.

Version

7.0

Warning

On Linux, this API simply returns A3D_ERROR.

Return values:
  • A3D_SUCCESS

  • A3D_ERROR

  • A3D_INVALID_ENTITY_NULL

  • A3D_INITIALIZE_NOT_CALLED

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DMiscUTF16ToUTF8(const A3DUniChar *pcInputBuffer, A3DUTF8Char acOutputBuffer[])

Converts a UTF-16 string to a UTF-8 string on Windows.

This function returns a UTF-8 string.

Version

7.0

Warning

On Linux, this API simply returns A3D_ERROR.

Return values:
  • A3D_SUCCESS

  • A3D_ERROR

  • A3D_INVALID_ENTITY_NULL

  • A3D_INITIALIZE_NOT_CALLED

Returns:

A3D_SUCCESS on success, or an error code on failure