]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix 'test_pax_filename_encoding_UTF16_win' by explicitly setting hdrcharset (#2248)
authorDuncan Horn <40036384+dunhor@users.noreply.github.com>
Sun, 7 Jul 2024 17:52:25 +0000 (10:52 -0700)
committerGitHub <noreply@github.com>
Sun, 7 Jul 2024 17:52:25 +0000 (19:52 +0200)
It would seem as though #2127 conflicted with my change #2228.

I previously thought that the writer was putting info into the archive
that strings were encoded in UTF-8, but I'm not so sure of that
anymore... In any case, explicitly setting `hdrcharset` on the reader as
well is a reasonable alternative and something we do already.

libarchive/test/test_pax_filename_encoding.c

index 3165b65dd33128cb1608044ed215dc1083fdda55..98db4cda193ebc01d437a7a2168aad2e12ca5bb4 100644 (file)
@@ -654,6 +654,7 @@ DEFINE_TEST(test_pax_filename_encoding_UTF16_win)
        a = archive_read_new();
        archive_read_support_format_all(a);
        archive_read_support_filter_all(a);
+       assertEqualInt(ARCHIVE_OK, archive_read_set_options(a, "hdrcharset=UTF-8"));
        assertEqualInt(0, archive_read_open_memory(a, buff, used));
 
        /* Read part 1: file */