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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef COMMON_STRING_ENCODING_H
24 #define COMMON_STRING_ENCODING_H
25 
26 namespace Common {
27 
28 class String;
29 class U32String;
30 
31 enum CodePage {
32 	kCodePageInvalid = -1,
33 	kUtf8 = 0,
34 	kWindows1250,
35 	kWindows1251,
36 	kWindows1252,
37 	kWindows1253,
38 	kWindows1254,
39 	kWindows1255,
40 	kWindows1256,
41 	kWindows1257,
42 	kWindows932,
43 	kWindows949,
44 	kWindows950,
45 	kISO8859_1,
46 	kISO8859_2,
47 	kISO8859_5,
48 	kMacCentralEurope,
49 	kMacRoman,
50 	kDos850,
51 	kDos862,
52 	kDos866,
53 	kASCII,
54 
55 	kLatin1 = kISO8859_1,
56 	kBig5 = kWindows950,
57 	kLastEncoding = kASCII
58 };
59 
60 U32String convertUtf8ToUtf32(const String &str);
61 String convertUtf32ToUtf8(const U32String &str);
62 
63 U32String convertToU32String(const char *str, CodePage page = kUtf8);
64 String convertFromU32String(const U32String &str, CodePage page = kUtf8);
65 uint16 convertUHCToUCS(uint8 high, uint8 low);
66 } // End of namespace Common
67 
68 #endif
69