diff --git a/buffer.py b/buffer.py index aa28cdb..0125422 100644 --- a/buffer.py +++ b/buffer.py @@ -596,8 +596,9 @@ class FileBuffer(Buffer): data = '' if data.startswith('\xEF\xBB\xBF'): - self.bytemark = data[:2] - data = data[2:] + # utf-8 + self.bytemark = data[:3] + data = data[3:] self.nl = self._detect_nl_type(data) data = self.read_filter(data)