static const char koi8_string[] = "\xD0\xD2\xC9";
static const wchar_t wcs_string[] = L"\U0000043f\U00000440\U00000438";
struct archive_mstring mstr;
+ struct archive *a;
int r;
memset(&mstr, 0, sizeof(mstr));
skipping("KOI8-R locale not available on this system.");
return;
}
+ a = archive_write_new();
+ assertEqualInt(ARCHIVE_OK, archive_write_set_format_pax(a));
+ 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);
+ return;
+ }
+ archive_write_free(a);
r = archive_mstring_update_utf8(NULL, &mstr, utf8_string);