summaryrefslogtreecommitdiff
path: root/src/pal/src/include/pal/utf8.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/include/pal/utf8.h')
-rw-r--r--src/pal/src/include/pal/utf8.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/pal/src/include/pal/utf8.h b/src/pal/src/include/pal/utf8.h
new file mode 100644
index 0000000000..2516caafb0
--- /dev/null
+++ b/src/pal/src/include/pal/utf8.h
@@ -0,0 +1,53 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+/*++
+
+
+
+Module Name:
+
+ include/pal/utf8.h
+
+Abstract:
+ Header file for UTF-8 conversion functions.
+
+Revision History:
+
+
+
+--*/
+
+#ifndef _PAL_UTF8_H_
+#define _PAL_UTF8_H_
+
+#include <pal/palinternal.h> /* for WCHAR */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+/*++
+Function :
+ UTF8ToUnicode
+
+ Convert a string from UTF-8 to UTF-16 (UCS-2)
+--*/
+int UTF8ToUnicode(LPCSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest, DWORD dwFlags);
+
+
+/*++
+Function :
+ UnicodeToUTF8
+
+ Convert a string from UTF-16 (UCS-2) to UTF-8
+--*/
+int UnicodeToUTF8(LPCWSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif /* _PAL_UTF8_H_ */