MCPcopy Create free account
hub / github.com/devilsen/CZXing / guessEncoding

Method guessEncoding

czxing/src/main/cpp/zxing/src/Content.cpp:191–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191CharacterSet Content::guessEncoding() const
192{
193 // assemble all blocks with unknown encoding
194 ByteArray input;
195 ForEachECIBlock([&](ECI eci, int begin, int end) {
196 if (eci == ECI::Unknown)
197 input.insert(input.end(), bytes.begin() + begin, bytes.begin() + end);
198 });
199
200 if (input.empty())
201 return CharacterSet::Unknown;
202
203 return TextDecoder::GuessEncoding(input.data(), input.size(), CharacterSet::ISO8859_1);
204}
205
206ContentType Content::type() const
207{

Callers

nothing calls this directly

Calls 6

insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected