diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2011-03-16 21:03:05 -0400 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2011-03-16 21:03:05 -0400 |
commit | a0891c6963a0970cd1dcd1872832e6d1ee98ec92 (patch) | |
tree | dc9acd34f042903a71927e3844dc4c3a75e6d978 /libarchive/archive_string.h | |
parent | 78c2205a5c92d68945baa26cb7c665c6bf632773 (diff) | |
download | libarchive-a0891c6963a0970cd1dcd1872832e6d1ee98ec92.tar.gz |
Move a conversion of UTF-16BE, which is used for Joliet extensions, into
archive_string.c, and Use iconv for it if available.
SVN-Revision: 3019
Diffstat (limited to 'libarchive/archive_string.h')
-rw-r--r-- | libarchive/archive_string.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libarchive/archive_string.h b/libarchive/archive_string.h index 292d5458..be5af709 100644 --- a/libarchive/archive_string.h +++ b/libarchive/archive_string.h @@ -86,6 +86,18 @@ archive_string_append_from_unicode_to_utf8(struct archive_string *, const wchar_ int archive_string_append_from_unicode_to_mbs(struct archive *, struct archive_string *, const wchar_t *, size_t); +/* Convert a UTF-16BE string to current locale and copy the result. + * Return -1 if conversion failes. */ +int +archive_string_copy_from_utf16be(struct archive *a, + struct archive_string *as, const unsigned char *utf16, size_t bytes); + +/* Convert a current locale string to UTF-16BE and copy the result. + * Return -1 if conversion failes. */ +int +archive_string_copy_to_utf16be(struct archive *a, + struct archive_string *a16be, struct archive_string *as); + /* Copy one archive_string to another */ #define archive_string_copy(dest, src) \ ((dest)->length = 0, archive_string_concat((dest), (src))) |