diff --git a/src/charset.h b/src/charset.h
index d1b3f75e3676e9d87ae87e15942bf35ffd78b3e0..651522939e1c216abf563cce59b1aed243c9a7d8 100644 (file)
--- a/src/charset.h
+++ b/src/charset.h
unsigned
utf8_width(const char *str);
+/**
+ * Returns the number of terminal cells occupied by this string.
+ */
+G_GNUC_PURE
+unsigned
+locale_width(const char *p);
+
+/**
+ * Limits the width of the specified string. Cuts it off before the
+ * specified width is exceeded.
+ *
+ * @return the resulting width of the string
+ */
+unsigned
+utf8_cut_width(char *p, unsigned max_width);
+
char *utf8_to_locale(const char *str);
char *locale_to_utf8(const char *str);
+/**
+ * Converts the UTF-8 string to the locale, and frees the source
+ * pointer. Returns the source pointer as-is if no conversion is
+ * required.
+ */
+char *
+replace_utf8_to_locale(char *src);
+
+/**
+ * Converts the locale string to UTF-8, and frees the source pointer.
+ * Returns the source pointer as-is if no conversion is required.
+ */
+char *
+replace_locale_to_utf8(char *src);
+
#endif