OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
TextEncoding.h
Go to the documentation of this file.
1/*****************************************************************/
9#pragma once
10#pragma warning(disable:4251)
11#include <string>
12#include <map>
13
15
16namespace ot
17{
19 {
20 public:
21 enum EncodingStandard { UTF8 = 0, UTF8_BOM = 1, ANSI = 2, UTF16_LEBOM = 3, UTF16_BEBOM = 4, UNKNOWN = 5 };
22 std::string getString(const EncodingStandard type) const;
23 EncodingStandard getType(const std::string& type) const;
24 private:
25
26 const std::map<EncodingStandard, std::string> _encodingStandardToString = { {UTF8, "UTF-8"}, {UTF8_BOM, "UTF-8 BOM"}, {ANSI, "ISO 8859-1"}, {UTF16_BEBOM, "UTF-16 BE BOM"}, {UTF16_LEBOM, "UTF-16 LE BOM"}, {UNKNOWN, "Unknown"} };
27 const std::map<std::string, EncodingStandard> _stringToEncodingStandard = { {"UTF-8",UTF8}, {"UTF-8 BOM",UTF8_BOM}, {"ISO 8859-1",ANSI}, {"UTF-16 BE BOM",UTF16_BEBOM}, {"UTF-16 LE BOM",UTF16_LEBOM}, {"Unknown",UNKNOWN} };
28 };
29}
#define OT_CORE_API_EXPORT
Dll import.
Definition CoreAPIExport.h:8
Definition TextEncoding.h:19
EncodingStandard
Definition TextEncoding.h:21
Definition Connector.h:8
@ UNKNOWN
Definition Connector.h:9