summaryrefslogtreecommitdiff
path: root/subversion/include/svn_utf.h
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/include/svn_utf.h')
-rw-r--r--subversion/include/svn_utf.h27
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 */