diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2011-03-17 13:39:29 -0400 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2011-03-17 13:39:29 -0400 |
commit | 85277695e6d24c90a7d293788c170a3f8fd19187 (patch) | |
tree | 9f16cdd138b064ec49231192bf3c8d91886f12b5 /libarchive/archive_string.h | |
parent | b31c81e6a802b6c4127a1b57d6ad7684199cbece (diff) | |
download | libarchive-85277695e6d24c90a7d293788c170a3f8fd19187.tar.gz |
Add charset conversion functions which convert a string between
current locale and specific locale with iconv.
SVN-Revision: 3021
Diffstat (limited to 'libarchive/archive_string.h')
-rw-r--r-- | libarchive/archive_string.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libarchive/archive_string.h b/libarchive/archive_string.h index 6922ff6b..e36b9952 100644 --- a/libarchive/archive_string.h +++ b/libarchive/archive_string.h @@ -98,6 +98,19 @@ int archive_strncpy_to_utf16be(struct archive *, struct archive_string *, const char *, size_t); +/* Convert MBS from specific locale to current locale and copy the result. + * Return -1 if conversion failes. */ +int +archive_strncpy_from_specific_locale(struct archive *, + struct archive_string *, const char *, size_t, const char *); + +/* Convert MBS from current locale to specific locale and copy the result. + * Return -1 if conversion failes. */ +int +archive_strncpy_to_specific_locale(struct archive *, + struct archive_string *, const char *, size_t, const char *); + + /* Copy one archive_string to another */ #define archive_string_copy(dest, src) \ ((dest)->length = 0, archive_string_concat((dest), (src))) |