ScummVM API documentation
str-enc.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef COMMON_STRING_ENCODING_H
23#define COMMON_STRING_ENCODING_H
24
25namespace Common {
26
27class String;
28class U32String;
29
30enum CodePage {
31 kCodePageInvalid = -1,
32 kUtf8 = 0,
33 kWindows1250,
34 kWindows1251,
35 kWindows1252,
36 kWindows1253,
37 kWindows1254,
38 kWindows1255,
39 kWindows1256,
40 kWindows1257,
41 kWindows932,
42 kWindows936,
43 kWindows949,
44 kWindows950,
45 kISO8859_1,
46 kISO8859_2,
47 kISO8859_5,
48 kMacCentralEurope,
49 kMacRoman,
50 kDos850,
51 kDos862,
52 kDos866,
53 kJohab,
54 kASCII,
55
56 kLatin1 = kISO8859_1,
57 kBig5 = kWindows950,
58 kGBK = kWindows936,
59 kEUCCN = kWindows936,
60 kLastEncoding = kASCII
61};
62
63enum StringEncodingResult {
64 kStringEncodingResultSucceeded,
65 kStringEncodingResultHasErrors,
66};
67
68U32String convertUtf8ToUtf32(const String &str);
69String convertUtf32ToUtf8(const U32String &str);
70
71U32String convertToU32String(const char *str, CodePage page = kUtf8);
72String convertFromU32String(const U32String &str, CodePage page = kUtf8);
73uint16 convertUHCToUCS(uint8 high, uint8 low);
74
75void releaseCJKTables();
76} // End of namespace Common
77
78#endif
Definition: algorithm.h:29