MBStrToUTF8Str
- Updated2023-02-21
- 2 minute(s) read
MBStrToUTF8Str
int MBStrToUTF8Str (const char multibyteString[], char **UTF8String, int flags);
Purpose
Converts an ANSI encoded multibyte string to a UTF-8 encoded, dynamically allocated string using the native character set.
The native character set corresponds to the selected language in the Control Panel for non-Unicode programs.
Parameters
Input | ||
Name | Type | Description |
multibyteString | const char [] | The ANSI multibyte Null-terminated string you want to convert. |
flags | int | Flags indicating the conversion type. Setting flags to kErrInvalidChars makes the function fail if an invalid input character is encountered. |
Output | ||
Name | Type | Description |
UTF8String | char * | Pointer to the null-terminated string encoded in UTF-8. When the pointer is no longer needed, free the pointer by calling the free function. |
Return Value
Name | Type | Description | ||||||||||
status | int | Result of the conversion.
|
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 2020 and later