From: Michihiro NAKAJIMA Date: Thu, 7 Apr 2011 12:01:19 +0000 (-0400) Subject: The filenames in pax should be written in UTF-8 without hdrcharset=UTF-8 option. X-Git-Tag: v3.0.0a~511 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6a6eb48e85affc321dc41ee75243941ee4a7db8;p=thirdparty%2Flibarchive.git The filenames in pax should be written in UTF-8 without hdrcharset=UTF-8 option. SVN-Revision: 3175 --- diff --git a/libarchive/test/test_pax_filename_encoding.c b/libarchive/test/test_pax_filename_encoding.c index 03d649aa8..44fdbb820 100644 --- a/libarchive/test/test_pax_filename_encoding.c +++ b/libarchive/test/test_pax_filename_encoding.c @@ -343,6 +343,7 @@ test_pax_filename_encoding_ru_RU() return; } + /* Check if the paltform completely supports the string conversion. */ a = archive_write_new(); assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a)); if (archive_write_set_options(a, "hdrcharset=UTF-8") != ARCHIVE_OK) { @@ -351,6 +352,12 @@ test_pax_filename_encoding_ru_RU() archive_write_free(a); return; } + archive_write_free(a); + + /* Re-create a write archive object since filenames should be written + * in UTF-8 by default. */ + a = archive_write_new(); + assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a)); assertEqualInt(ARCHIVE_OK, archive_write_open_memory(a, buff, sizeof(buff), &used)); entry = archive_entry_new2(a); @@ -382,6 +389,7 @@ test_pax_filename_encoding_ja_JP() return; } + /* Check if the paltform completely supports the string conversion. */ a = archive_write_new(); assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a)); if (archive_write_set_options(a, "hdrcharset=UTF-8") != ARCHIVE_OK) { @@ -390,6 +398,12 @@ test_pax_filename_encoding_ja_JP() archive_write_free(a); return; } + archive_write_free(a); + + /* Re-create a write archive object since filenames should be written + * in UTF-8 by default. */ + a = archive_write_new(); + assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a)); assertEqualInt(ARCHIVE_OK, archive_write_open_memory(a, buff, sizeof(buff), &used)); entry = archive_entry_new2(a);