diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-03-18 13:33:26 +0000 |
---|---|---|
committer | <> | 2015-07-08 14:41:01 +0000 |
commit | bb0ef45f7c46b0ae221b26265ef98a768c33f820 (patch) | |
tree | 98bae10dde41c746c51ae97ec4f879e330415aa7 /subversion/include/svn_utf.h | |
parent | 239dfafe71711b2f4c43d7b90a1228d7bdc5195e (diff) | |
download | subversion-tarball-subversion-1.8.13.tar.gz |
Imported from /home/lorry/working-area/delta_subversion-tarball/subversion-1.8.13.tar.gz.subversion-1.8.13
Diffstat (limited to 'subversion/include/svn_utf.h')
-rw-r--r-- | subversion/include/svn_utf.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/subversion/include/svn_utf.h b/subversion/include/svn_utf.h index e0c3be8..4a2c137 100644 --- a/subversion/include/svn_utf.h +++ b/subversion/include/svn_utf.h @@ -49,13 +49,30 @@ extern "C" { * Initialize the UTF-8 encoding/decoding routines. * Allocate cached translation handles in a subpool of @a pool. * + * If @a assume_native_utf8 is TRUE, the native character set is + * assumed to be UTF-8, i.e. conversion is a no-op. This is useful + * in contexts where the native character set is ASCII but UTF-8 + * should be used regardless (e.g. for mod_dav_svn which runs within + * httpd and always uses the "C" locale). + * * @note It is optional to call this function, but if it is used, no other * svn function may be in use in other threads during the call of this * function or when @a pool is cleared or destroyed. * Initializing the UTF-8 routines will improve performance. * - * @since New in 1.1. + * @since New in 1.8. + */ +void +svn_utf_initialize2(svn_boolean_t assume_native_utf8, + apr_pool_t *pool); + +/** + * Like svn_utf_initialize2() but without the ability to force the + * native encoding to UTF-8. + * + * @deprecated Provided for backward compatibility with the 1.7 API. */ +SVN_DEPRECATED void svn_utf_initialize(apr_pool_t *pool); @@ -220,6 +237,14 @@ svn_utf_cstring_from_utf8_string(const char **dest, const svn_string_t *src, apr_pool_t *pool); +/** Return the display width of UTF-8-encoded C string @a cstr. + * If the string is not printable or invalid UTF-8, return -1. + * + * @since New in 1.8. + */ +int +svn_utf_cstring_utf8_width(const char *cstr); + #ifdef __cplusplus } #endif /* __cplusplus */ |