MeVisLab Toolbox Reference
mlUnicode.h File Reference
#include "mlUtilsSystem.h"

Go to the source code of this file.

Functions

Unicode string conversion

Defines mapping functions from local strings to unicode and vice-versa.

Thread-safety: These functions are reentrant.

ML_UTILS_EXPORT MLuint16MLConvertUTF8ToUTF16 (const char *inputString)
 Converts the given char string inputString (UTF-8, terminated by 0) to UTF-16, returns a newly allocated string that must be freed with MLFree(). More...
 
ML_UTILS_EXPORT MLuint32MLConvertUTF8ToUTF32 (const char *inputString)
 Converts the given char string inputString (UTF-8, terminated by 0) to UTF-32, returns a newly allocated string that must be freed with MLFree(). More...
 
ML_UTILS_EXPORT char * MLConvertUTF16ToUTF8 (const MLuint16 *inputWideString)
 Converts the given wide string inputWideString (UTF-16, terminated by 0) to UTF-8, returns a newly allocated wide string that must be freed with MLFree(). More...
 
ML_UTILS_EXPORT char * MLConvertUTF8ToLatin1 (const char *inputUTFString)
 Converts the given UTF-8 encoded and NULL-terminated string inputUTFString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree(). More...
 
ML_UTILS_EXPORT char * MLConvertUTF16ToLatin1 (const MLuint16 *inputUTF16WideString)
 Converts the given UTF-16 encoded wide and NULL-terminated string inputUTF16WideString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree(). More...
 
ML_UTILS_EXPORT char * MLConvertLatin1ToUTF8 (const char *inputLatin1String)
 Converts the given Latin1 encoded and NULL-terminated string inputLatin1String into a UTF-8 string, the returned string must be freed with MLFree(). More...
 
ML_UTILS_EXPORT MLuint16MLConvertLatin1ToUTF16 (const char *inputLatin1String)
 Convert the given Latin1 encoded and NULL-terminated string inputLatin1String to a UTF-16 string, the returned string must be freed with MLFree(). More...
 

Function Documentation

◆ MLConvertLatin1ToUTF16()

ML_UTILS_EXPORT MLuint16* MLConvertLatin1ToUTF16 ( const char *  inputLatin1String)

Convert the given Latin1 encoded and NULL-terminated string inputLatin1String to a UTF-16 string, the returned string must be freed with MLFree().

Returns NULL on error.

◆ MLConvertLatin1ToUTF8()

ML_UTILS_EXPORT char* MLConvertLatin1ToUTF8 ( const char *  inputLatin1String)

Converts the given Latin1 encoded and NULL-terminated string inputLatin1String into a UTF-8 string, the returned string must be freed with MLFree().

Returns NULL on error.

◆ MLConvertUTF16ToLatin1()

ML_UTILS_EXPORT char* MLConvertUTF16ToLatin1 ( const MLuint16 inputUTF16WideString)

Converts the given UTF-16 encoded wide and NULL-terminated string inputUTF16WideString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree().

Returns NULL on error.

◆ MLConvertUTF16ToUTF8()

ML_UTILS_EXPORT char* MLConvertUTF16ToUTF8 ( const MLuint16 inputWideString)

Converts the given wide string inputWideString (UTF-16, terminated by 0) to UTF-8, returns a newly allocated wide string that must be freed with MLFree().

Returns NULL on error.

◆ MLConvertUTF8ToLatin1()

ML_UTILS_EXPORT char* MLConvertUTF8ToLatin1 ( const char *  inputUTFString)

Converts the given UTF-8 encoded and NULL-terminated string inputUTFString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree().

Returns NULL on error.

◆ MLConvertUTF8ToUTF16()

ML_UTILS_EXPORT MLuint16* MLConvertUTF8ToUTF16 ( const char *  inputString)

Converts the given char string inputString (UTF-8, terminated by 0) to UTF-16, returns a newly allocated string that must be freed with MLFree().

Returns NULL on error.

◆ MLConvertUTF8ToUTF32()

ML_UTILS_EXPORT MLuint32* MLConvertUTF8ToUTF32 ( const char *  inputString)

Converts the given char string inputString (UTF-8, terminated by 0) to UTF-32, returns a newly allocated string that must be freed with MLFree().

Returns NULL on error.