Main index | Section 3 | Options |
Libarchive3 uses the standard iconv library to convert between character sets and is introducing the notion of a "default character set for the archive". To support this, archive_entry objects can now be bound to a particular archive when they are created. The automatic character set conversions performed by archive_entry objects when reading and writing filenames, usernames, and other strings will now use an appropriate default character set:
If the archive_entry object is bound to an archive, it will use the default character set for that archive.
The platform default character encoding (as returned by nl_langinfo(CHARSET)) will be used if nothing else is specified.
Libarchive3 also introduces charset options to many of the archive readers and writers to control the character set that will be used for filenames written in those archives. When possible, this will be set automatically based on information in the archive itself. Combining this with the notion of a default character set for the archive should allow you to configure libarchive to read archives from other platforms and have the filenames and other information transparently converted to the character encoding suitable for your application.
There are a few cases where these changes will affect your source code:
#if ARCHIVE_VERSION_NUMBER < 3000000 typedef off_t myoff_t; #else typedef int64_t myoff_t; #endifmyoff_t my_skip_function(struct archive *a, void *v, myoff_t o) { ... implementation ... }
Affected functions:
Where these functions or their arguments took or returned gid_t, ino_t, off_t, or uid_t they now take or return int64_t or equivalent.
archive_position_compressed(,)archive_position_uncompressed() | |
archive_filter_bytes() | |
archive_compression() | |
archive_filter_code() | |
archive_compression_name() | |
archive_filter_name() | |
archive_read_finish(,)archive_write_finish() | |
archive_read_free(), archive_write_free() | |
archive_read_open_file(,)archive_write_open_file() | |
archive_read_open_filename(), archive_write_open_filename() | |
archive_read_support_compression_all() | |
archive_read_support_filter_all() | |
archive_read_support_compression_bzip2() | |
archive_read_support_filter_bzip2() | |
archive_read_support_compression_compress() | |
archive_read_support_filter_compress() | |
archive_read_support_compression_gzip() | |
archive_read_support_filter_gzip() | |
archive_read_support_compression_lzip() | |
archive_read_support_filter_lzip() | |
archive_read_support_compression_lzma() | |
archive_read_support_filter_lzma() | |
archive_read_support_compression_none() | |
archive_read_support_filter_none() | |
archive_read_support_compression_program() | |
archive_read_support_filter_program() | |
archive_read_support_compression_program_signature() | |
archive_read_support_filter_program_signature() | |
archive_read_support_compression_rpm() | |
archive_read_support_filter_rpm() | |
archive_read_support_compression_uu() | |
archive_read_support_filter_uu() | |
archive_read_support_compression_xz() | |
archive_read_support_filter_xz() | |
archive_write_set_compression_bzip2() | |
archive_write_add_filter_bzip2() | |
archive_write_set_compression_compress() | |
archive_write_add_filter_compress() | |
archive_write_set_compression_gzip() | |
archive_write_add_filter_gzip() | |
archive_write_set_compression_lzip() | |
archive_write_add_filter_lzip() | |
archive_write_set_compression_lzma() | |
archive_write_add_filter_lzma() | |
archive_write_set_compression_none() | |
archive_write_add_filter_none() | |
archive_write_set_compression_program() | |
archive_write_add_filter_program() | |
archive_write_set_compression_filter() | |
archive_write_add_filter_filter() | |
archive_api_feature() | |
archive_version_number() | |
archive_api_version() | |
archive_version_number() | |
archive_version() | |
archive_version_string() | |
archive_version_stamp() | |
archive_version_number() | |
archive_read_set_filter_options() | |
archive_read_set_options() or archive_read_set_filter_option() | |
archive_read_set_format_options() | |
archive_read_set_options() or archive_read_set_format_option() | |
archive_write_set_filter_options() | |
archive_write_set_options() or archive_write_set_filter_option() | |
archive_write_set_format_options() | |
archive_write_set_options() or archive_write_set_format_option() | |
ARCHIVE_API_FEATURE | |
ARCHIVE_VERSION_NUMBER | |
ARCHIVE_API_VERSION | |
ARCHIVE_VERSION_NUMBER | |
ARCHIVE_VERSION_STAMP | |
ARCHIVE_VERSION_NUMBER | |
ARCHIVE_LIBRARY_VERSION | |
ARCHIVE_VERSION_STRING | |
ARCHIVE_COMPRESSION_NONE | |
ARCHIVE_FILTER_NONE | |
ARCHIVE_COMPRESSION_GZIP | |
ARCHIVE_FILTER_GZIP | |
ARCHIVE_COMPRESSION_BZIP2 | |
ARCHIVE_FILTER_BZIP2 | |
ARCHIVE_COMPRESSION_COMPRESS | |
ARCHIVE_FILTER_COMPRESS | |
ARCHIVE_COMPRESSION_PROGRAM | |
ARCHIVE_FILTER_PROGRAM | |
ARCHIVE_COMPRESSION_LZMA | |
ARCHIVE_FILTER_LZMA | |
ARCHIVE_COMPRESSION_XZ | |
ARCHIVE_FILTER_XZ | |
ARCHIVE_COMPRESSION_UU | |
ARCHIVE_FILTER_UU | |
ARCHIVE_COMPRESSION_RPM | |
ARCHIVE_FILTER_RPM | |
ARCHIVE_COMPRESSION_LZIP | |
ARCHIVE_FILTER_LZIP | |
ARCHIVE_BYTES_PER_RECORD | |
512 | |
ARCHIVE_DEFAULT_BYTES_PER_BLOCK | |
10240 | |
LIBARCHIVE_CHANGES (3) | December 23, 2011 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If you sat a monkey down in front of a keyboard, the first thing typed would be a unix command. | ” |
— Bill Lye |