OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EncodingGuesser.h
Go to the documentation of this file.
1/*****************************************************************/
9#pragma once
10#include <vector>
11#include <string>
13#include "OTCore/TextEncoding.h"
14
15namespace ot
16{
18 {
19 public:
20 TextEncoding::EncodingStandard operator()(const std::vector<char>& fileContent);
21 TextEncoding::EncodingStandard operator()(const char* fileContent, int64_t size);
22 private:
23 using byte = unsigned char;
24 const byte utf8Bom[3] = { 0xEF, 0xBB, 0xBF }; // This is the UTF-16 BOM after being converted to UTF-8
25 const byte bigEndianBom[2] = { 0xFE, 0xFF };
26 const byte littleEndianBom[2] = { 0xFF, 0xFE };
27
28 bool CheckIfISO(byte* fileContent, int64_t numberOfBytes);
29 };
30}
#define OT_CORE_API_EXPORT
Dll import.
Definition CoreAPIExport.h:8
MongoDB uses only UTF-8 and some errors occured if the characters with different encoding standard we...
Definition EncodingGuesser.h:18
EncodingStandard
Definition TextEncoding.h:21
Definition Connector.h:8