MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / ReadBOM

Method ReadBOM

sourcecommon/tinyxml2.cpp:255–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253// --------- XMLUtil ----------- //
254
255const char* XMLUtil::ReadBOM( const char* p, bool* bom )
256{
257 *bom = false;
258 const unsigned char* pu = reinterpret_cast<const unsigned char*>(p);
259 // Check for BOM:
260 if ( *(pu+0) == TIXML_UTF_LEAD_0
261 && *(pu+1) == TIXML_UTF_LEAD_1
262 && *(pu+2) == TIXML_UTF_LEAD_2 ) {
263 *bom = true;
264 p += 3;
265 }
266 return p;
267}
268
269
270void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected