in particular reading or writing pax format, the "charset" option can be used to
a content of the file stored in pax archive file, and then "hdrcharset" described
for its metadata such as filename.
SVN-Revision: 3165
int ret = ARCHIVE_FAILED;
cab = (struct cab *)(a->format->data);
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "cab: charset option needs a character-set name");
+ "cab: hdrcharset option needs a character-set name");
else {
cab->sconv = archive_string_conversion_from_charset(
&a->archive, val, 0);
int ret = ARCHIVE_FAILED;
lha = (struct lha *)(a->format->data);
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "lha: charset option needs a character-set name");
+ "lha: hdrcharset option needs a character-set name");
else {
lha->opt_sconv =
archive_string_conversion_from_charset(
int ret = ARCHIVE_FAILED;
tar = (struct tar *)(a->format->data);
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "tar: charset option needs a character-set name");
+ "tar: hdrcharset option needs a character-set name");
else {
tar->opt_sconv =
archive_string_conversion_from_charset(
int ret = ARCHIVE_FAILED;
xar = (struct xar *)(a->format->data);
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "xar: charset option needs a character-set name");
+ "xar: hdrcharset option needs a character-set name");
else {
struct archive_string_conv *sc;
int ret = ARCHIVE_FAILED;
zip = (struct zip *)(a->format->data);
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "zip: charset option needs a character-set name");
+ "zip: hdrcharset option needs a character-set name");
else {
zip->sconv = archive_string_conversion_from_charset(
&a->archive, val, 0);
struct gnutar *gnutar = (struct gnutar *)a->format_data;
int ret = ARCHIVE_FAILED;
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "%s: charset option needs a character-set name",
+ "%s: hdrcharset option needs a character-set name",
a->format_name);
else {
gnutar->opt_sconv = archive_string_conversion_to_charset(
struct pax *pax = (struct pax *)a->format_data;
int ret = ARCHIVE_FAILED;
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
/*
* The character-set we can use are defined in
* IEEE Std 1003.1-2001
*/
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "pax: charset option needs a character-set name");
+ "pax: hdrcharset option needs a character-set name");
else if (strcmp(val, "BINARY") == 0 ||
strcmp(val, "binary") == 0) {
/*
struct ustar *ustar = (struct ustar *)a->format_data;
int ret = ARCHIVE_FAILED;
- if (strcmp(key, "charset") == 0) {
+ if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0)
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "%s: charset option needs a character-set name",
+ "%s: hdrcharset option needs a character-set name",
a->format_name);
else {
ustar->opt_sconv = archive_string_conversion_to_charset(
zip->compression = COMPRESSION_STORE;
ret = ARCHIVE_OK;
}
- } else if (strcmp(key, "charset") == 0) {
+ } else if (strcmp(key, "hdrcharset") == 0) {
if (val == NULL || val[0] == 0) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "%s: charset option needs a character-set name",
+ "%s: hdrcharset option needs a character-set name",
a->format_name);
} else {
zip->opt_sconv = archive_string_conversion_to_charset(
a = archive_write_new();
assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a));
- if (archive_write_set_options(a, "charset=UTF-8") != ARCHIVE_OK) {
+ if (archive_write_set_options(a, "hdrcharset=UTF-8") != ARCHIVE_OK) {
skipping("This system cannot convert character-set"
" from KOI8-R to UTF-8.");
archive_write_free(a);
a = archive_write_new();
assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a));
- if (archive_write_set_options(a, "charset=UTF-8") != ARCHIVE_OK) {
+ if (archive_write_set_options(a, "hdrcharset=UTF-8") != ARCHIVE_OK) {
skipping("This system cannot convert character-set"
" from eucJP to UTF-8.");
archive_write_free(a);
struct archive_entry *ae;
/*
- * Read CAB filename in ja_JP.eucJP with "charset=CP932" option.
+ * Read CAB filename in ja_JP.eucJP with "hdrcharset=CP932" option.
*/
if (NULL == setlocale(LC_ALL, "ja_JP.eucJP")) {
skipping("ja_JP.eucJP locale not available on this system.");
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=CP932")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) {
skipping("This system cannot convert character-set"
" from CP932 to eucJP.");
goto cleanup;
struct archive_entry *ae;
/*
- * Read CAB filename in ja_JP.UTF-8 with "charset=CP932" option.
+ * Read CAB filename in ja_JP.UTF-8 with "hdrcharset=CP932" option.
*/
if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) {
skipping("ja_JP.UTF-8 locale not available on this system.");
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=CP932")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) {
skipping("This system cannot convert character-set"
" from CP932 to UTF-8.");
goto cleanup;
*/
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=CP932")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) {
assertEqualInt(ARCHIVE_OK, archive_read_free(a));
skipping("This system cannot convert character-set"
" from CP932 to eucJP.");
*/
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=CP932")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) {
assertEqualInt(ARCHIVE_OK, archive_read_free(a));
skipping("This system cannot convert character-set"
" from CP932 to UTF-8.");
struct archive_entry *ae;
/*
- * Read ZIP filename in ja_JP.eucJP with "charset=CP932" option.
+ * Read ZIP filename in ja_JP.eucJP with "hdrcharset=CP932" option.
*/
if (NULL == setlocale(LC_ALL, "ja_JP.eucJP")) {
skipping("ja_JP.eucJP locale not available on this system.");
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=CP932")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) {
skipping("This system cannot convert character-set"
" from CP932 to eucJP.");
goto cleanup;
struct archive_entry *ae;
/*
- * Read ZIP filename in ja_JP.UTF-8 with "charset=CP932" option.
+ * Read ZIP filename in ja_JP.UTF-8 with "hdrcharset=CP932" option.
*/
if (NULL == setlocale(LC_ALL, "ja_JP.UTF-8")) {
skipping("ja_JP.UTF-8 locale not available on this system.");
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=CP932")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) {
skipping("This system cannot convert character-set"
" from CP932 to UTF-8.");
goto cleanup;
}
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a));
- if (ARCHIVE_OK != archive_read_set_options(a, "charset=UTF-8")) {
+ if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=UTF-8")) {
skipping("This system cannot convert character-set"
" from UTF-8 to eucJP.");
goto cleanup;