diff options
author | brane <brane@13f79535-47bb-0310-9956-ffa450edef68> | 2003-01-03 09:05:28 +0000 |
---|---|---|
committer | brane <brane@13f79535-47bb-0310-9956-ffa450edef68> | 2003-01-03 09:05:28 +0000 |
commit | e1ccc036bf786506f6fa83bbab4cf80bf8ea4d61 (patch) | |
tree | 56aa3fd0d16b169e4c495a0879e13fca6d1a41fc /include/apr_file_info.h | |
parent | 9b600c427966a3c64ad9e1246f3ba55c5cb62d15 (diff) | |
download | libapr-e1ccc036bf786506f6fa83bbab4cf80bf8ea4d61.tar.gz |
Added a new function, apr_filepath_encoding, to determine the character
encoding used internally by the file_io and file_info functions. In most
cases, the encoding is locale-dependent; on Windows, though, it's usually
(but not always!) UTF-8.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64260 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_file_info.h')
-rw-r--r-- | include/apr_file_info.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/apr_file_info.h b/include/apr_file_info.h index 8751d6c8a..5b2ee8f75 100644 --- a/include/apr_file_info.h +++ b/include/apr_file_info.h @@ -406,6 +406,32 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **path, apr_int32_t flags, */ APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p); +/** + * @defgroup apr_filepath_encoding FilePath Character encoding + * @{ + */ + +/** The FilePath character encoding is unknown */ +#define APR_FILEPATH_ENCODING_UNKNOWN 0 + +/** The FilePath character encoding is locale-dependent */ +#define APR_FILEPATH_ENCODING_LOCALE 1 + +/** The FilePath character encoding is UTF-8 */ +#define APR_FILEPATH_ENCODING_UTF8 2 +/** @} */ +/** + * Determine the encoding used internally by the FilePath functions + * @ingroup apr_filepath_encoding + * @param style points to a variable which receives the encoding style flag + * @param p the pool to allocate any working storage + * @deffunc apr_status_t apr_filepath_encoding(int *style, apr_pool_t *p) + * @remark Use @c apr_os_locale_encoding and/or @c apr_os_default_encoding + * to get the name of the path encoding if it's not UTF-8. + */ +APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p); + + /** @} */ #ifdef __cplusplus |