summaryrefslogtreecommitdiff
path: root/Source/modules/asura-base/Misc/UTF8.h
blob: 269ad3641d746a77351f64e531ab4e5693d48fc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <string>

#include "../Type.h"
#include "../Classes.h"
#include "../Utilities/dynamic_array.h"

namespace_begin(AsuraEngine)

typedef uint16 UnicodeChar;

bool ConvertUTF8toUTF16(const char* source, int srcLength, UnicodeChar* output, int& outlength);
bool ConvertUTF8toUTF16(const std::string& source, dynamic_array<UnicodeChar>& utf16);
bool ConvertUTF16toUTF8(const uint16* source, int srcLength, char* output, int& outlength);
bool ConvertUTF16toUTF8(const dynamic_array<UnicodeChar>& source, std::string& utf8);
bool ConvertUTF16toUTF8(const uint16* source, int srcLength, char* output, int& outlength);
bool ConvertUTF16toUTF8(const uint16 utf16character, std::string& utf8);

namespace_end