- if (
- line->length() >= 3 &&
- static_cast<unsigned char> (line.get()[0]) == 0xef &&
- static_cast<unsigned char> (line.get()[1]) == 0xbb &&
- static_cast<unsigned char> (line.get()[2]) == 0xbf
- ) {
-
- /* Skip Unicode byte order mark */
- line = line->substr (3);
+ /* Keep some history in case there is an error to report */
+ _context.push_back (*line);
+ if (_context.size() > 5) {
+ _context.pop_front ();