UTF8 truncate test

Test correct truncation of UTF-8, related to #166.