From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Misc/UTF8.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Runtime/Misc/UTF8.h (limited to 'Runtime/Misc/UTF8.h') diff --git a/Runtime/Misc/UTF8.h b/Runtime/Misc/UTF8.h new file mode 100644 index 0000000..c21a367 --- /dev/null +++ b/Runtime/Misc/UTF8.h @@ -0,0 +1,12 @@ +#pragma once + +#include "Runtime/Utilities/dynamic_array.h" + +typedef UInt16 UnicodeChar; + +bool ConvertUTF8toUTF16 (const char* source, int srcLength, UnicodeChar* output, int& outlength); +bool ConvertUTF8toUTF16 (const std::string& source, dynamic_array& utf16); +bool ConvertUTF16toUTF8 (const UInt16* source, int srcLength, char* output, int& outlength); +bool ConvertUTF16toUTF8 (const dynamic_array& source, std::string& utf8); +bool ConvertUTF16toUTF8 (const UInt16* source, int srcLength, char* output, int& outlength); +bool ConvertUTF16toUTF8 (const UInt16 utf16character, std::string& utf8); -- cgit v1.1-26-g67d0