Lines Matching +full:bom +full:- +full:check

158     size_t Tell() const { return is_->Tell(); }  in Tell()
170 // Detect encoding type with BOM or RFC 4627
172 // BOM (Byte Order Mark): in DetectType()
173 // 00 00 FE FF UTF-32BE in DetectType()
174 // FF FE 00 00 UTF-32LE in DetectType()
175 // FE FF UTF-16BE in DetectType()
176 // FF FE UTF-16LE in DetectType()
177 // EF BB BF UTF-8 in DetectType()
179 const unsigned char* c = reinterpret_cast<const unsigned char *>(is_->Peek4()); in DetectType()
183 unsigned bom = static_cast<unsigned>(c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24)); in DetectType() local
185 …if (bom == 0xFFFE0000) { type_ = kUTF32BE; hasBOM_ = true; is_->Take(); is_->Take… in DetectType()
186 …else if (bom == 0x0000FEFF) { type_ = kUTF32LE; hasBOM_ = true; is_->Take(); is_->Take… in DetectType()
187 …else if ((bom & 0xFFFF) == 0xFFFE) { type_ = kUTF16BE; hasBOM_ = true; is_->Take(); is_->Take… in DetectType()
188 …else if ((bom & 0xFFFF) == 0xFEFF) { type_ = kUTF16LE; hasBOM_ = true; is_->Take(); is_->Take… in DetectType()
189 …else if ((bom & 0xFFFFFF) == 0xBFBBEF) { type_ = kUTF8; hasBOM_ = true; is_->Take(); is_->Take… in DetectType()
194 // stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking in DetectType()
196 // 00 00 00 xx UTF-32BE in DetectType()
197 // 00 xx 00 xx UTF-16BE in DetectType()
198 // xx 00 00 00 UTF-32LE in DetectType()
199 // xx 00 xx 00 UTF-16LE in DetectType()
200 // xx xx xx xx UTF-8 in DetectType()
214 …// Runtime check whether the size of character type is sufficient. It only perform checks with ass… in DetectType()
242 \param putBOM Whether to write BOM at the beginning of the stream.
247 …// Runtime check whether the size of character type is sufficient. It only perform checks with ass… in AutoUTFOutputStream()
261 void Flush() { os_->Flush(); } in Flush()