From e1ccc036bf786506f6fa83bbab4cf80bf8ea4d61 Mon Sep 17 00:00:00 2001 From: brane Date: Fri, 3 Jan 2003 09:05:28 +0000 Subject: 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 --- include/apr_file_info.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'include/apr_file_info.h') 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 -- cgit v1.2.1