TianoCore EDK2 master
|
Go to the source code of this file.
Macros | |
#define | UNICODE_FORMAT_LEN 6 |
#define | UNICODE_FORMAT_CHAR_LEN 2 |
#define | UNICODE_FORMAT_CHAR_SIZE 3 |
#define | UTF8_BUFFER_FOR_UCS2_MAX_SIZE 3 |
Functions | |
EFI_STATUS | UCS2StrToUTF8 (IN CHAR16 *Ucs2Str, OUT CHAR8 **Utf8StrAddr) |
EFI_STATUS | UTF8StrToUCS2 (IN CHAR8 *Utf8Str, OUT CHAR16 **Ucs2StrAddr) |
UCS2 to UTF8 manipulation library header file.
Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2020 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BaseUcs2Utf8Lib.h.
#define UNICODE_FORMAT_CHAR_LEN 2 |
Definition at line 18 of file BaseUcs2Utf8Lib.h.
#define UNICODE_FORMAT_CHAR_SIZE 3 |
Definition at line 19 of file BaseUcs2Utf8Lib.h.
#define UNICODE_FORMAT_LEN 6 |
L"\u0000"
Definition at line 17 of file BaseUcs2Utf8Lib.h.
#define UTF8_BUFFER_FOR_UCS2_MAX_SIZE 3 |
Definition at line 21 of file BaseUcs2Utf8Lib.h.
EFI_STATUS UCS2StrToUTF8 | ( | IN CHAR16 * | Ucs2Str, |
OUT CHAR8 ** | Utf8StrAddr | ||
) |
Convert a UCS2 string to a UTF8 encoded string.
[in] | Ucs2Str | The provided UCS2 string. |
[out] | Utf8StrAddr | The converted UTF8 string address. Caller is responsible for Free this string. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_OUT_OF_RESOURCES | System runs out of resources. |
EFI_SUCCESS | The UTF8 encoded string has been converted. |
Definition at line 266 of file BaseUcs2Utf8Lib.c.
EFI_STATUS UTF8StrToUCS2 | ( | IN CHAR8 * | Utf8Str, |
OUT CHAR16 ** | Ucs2StrAddr | ||
) |
Convert a UTF8 encoded string to a UCS2 string.
[in] | Utf8Str | The provided UTF8 encoded string. |
[out] | Ucs2StrAddr | The converted UCS2 string address. Caller is responsible for Free this string. |
EFI_INVALID_PARAMETER | The UTF8 encoded string is not valid to convert to UCS2 string. One or more parameters are invalid. |
EFI_OUT_OF_RESOURCES | System runs out of resources. |
EFI_SUCCESS | The UCS2 string has been converted. |
Definition at line 327 of file BaseUcs2Utf8Lib.c.