From 9e83266525aad5c6210b9a21be9b1c6996d5544f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 22 Dec 2006 22:06:08 +0100 Subject: commit-tree: encourage UTF-8 commit messages. Introduce is_utf() to check if a text looks like it is encoded in UTF-8, utf8_width() to count display width, and implements print_wrapped_text() using them. git-commit-tree warns if the commit message does not minimally conform to the UTF-8 encoding when i18n.commitencoding is either unset, or set to "utf-8". Signed-off-by: Junio C Hamano --- utf8.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 utf8.h (limited to 'utf8.h') diff --git a/utf8.h b/utf8.h new file mode 100644 index 0000000000..a0d7f591ad --- /dev/null +++ b/utf8.h @@ -0,0 +1,8 @@ +#ifndef GIT_UTF8_H +#define GIT_UTF8_H + +int utf8_width(const char **start); +int is_utf8(const char *text); +void print_wrapped_text(const char *text, int indent, int indent2, int len); + +#endif -- cgit v1.2.1