diff --git a/pandas/io/tests/parser/common.py b/pandas/io/tests/parser/common.py index 7777a9f2fadb5..b90fc304e125e 100644 --- a/pandas/io/tests/parser/common.py +++ b/pandas/io/tests/parser/common.py @@ -1593,3 +1593,11 @@ def test_read_csv_utf_aliases(self): data = 'mb_num,multibyte\n4.8,test'.encode(encoding) result = self.read_csv(BytesIO(data), encoding=encoding) tm.assert_frame_equal(result, expected) + + def test_internal_eof_byte(self): + # see gh-5500 + data = "a,b\n1\x1a,2" + + expected = pd.DataFrame([["1\x1a", 2]], columns=['a', 'b']) + result = self.read_csv(StringIO(data)) + tm.assert_frame_equal(result, expected)