]>
git.proxmox.com Git - mirror_edk2.git/blob - RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h
2 UCS2 to UTF8 manipulation library header file.
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef BASE_UCS2UTF8_LIB_H_
12 #define BASE_UCS2UTF8_LIB_H_
17 #define UNICODE_FORMAT_LEN 6
18 #define UNICODE_FORMAT_CHAR_LEN 2
19 #define UNICODE_FORMAT_CHAR_SIZE 3
21 #define UTF8_BUFFER_FOR_UCS2_MAX_SIZE 3
24 Convert a UCS2 string to a UTF8 encoded string.
26 @param[in] Ucs2Str The provided UCS2 string.
27 @param[out] Utf8StrAddr The converted UTF8 string address. Caller
28 is responsible for Free this string.
30 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
31 @retval EFI_OUT_OF_RESOURCES System runs out of resources.
32 @retval EFI_SUCCESS The UTF8 encoded string has been converted.
38 OUT CHAR8
**Utf8StrAddr
42 Convert a UTF8 encoded string to a UCS2 string.
44 @param[in] Utf8Str The provided UTF8 encoded string.
45 @param[out] Ucs2StrAddr The converted UCS2 string address. Caller
46 is responsible for Free this string.
48 @retval EFI_INVALID_PARAMETER The UTF8 encoded string is not valid to
49 convert to UCS2 string.
50 One or more parameters are invalid.
51 @retval EFI_OUT_OF_RESOURCES System runs out of resources.
52 @retval EFI_SUCCESS The UCS2 string has been converted.
58 OUT CHAR16
**Ucs2StrAddr