From 046ce2e8d22ea384dc7e1e4545bede6fd859d9c3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 3 Jun 2021 16:13:58 +0200 Subject: Add "U8" character code table for binary STL. A file was sent that has "U8" as a STL CCT. I presume this means "UTF-8" but I can't see any documentation about it anywhere. This change accepts U8 as a CCT. It doesn't look like this value is actually used anywhere to change how text is parsed, but at least it doesn't fail now. --- test/stl_binary_reader_test.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/stl_binary_reader_test.cc') diff --git a/test/stl_binary_reader_test.cc b/test/stl_binary_reader_test.cc index dfd7c0a..cf97b5a 100644 --- a/test/stl_binary_reader_test.cc +++ b/test/stl_binary_reader_test.cc @@ -68,3 +68,17 @@ BOOST_AUTO_TEST_CASE (stl_binary_reader_test2) sub::dump (r, dump_stream); dump_stream.close (); } + + +/** Test reading a file which raised "Unknown language group code U8" */ +BOOST_AUTO_TEST_CASE (stl_binary_reader_test3) +{ + if (private_test.empty()) { + return; + } + + auto path = private_test / "hsk.stl"; + ifstream in (path.string().c_str()); + auto reader = make_shared(in); +} + -- cgit v1.2.3