diff src/utf8.cc @ 1128:fbe2ce98a4b8

make tab expansion for plain text utf8 aware In discussion with corvid <corvid@lavabit.com>.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 25 May 2009 18:42:24 +0200
parents 94b9265663f6
children cdcb6c1fb148
line wrap: on
line diff
--- a/src/utf8.cc	Sun May 24 21:52:59 2009 +0000
+++ b/src/utf8.cc	Mon May 25 18:42:24 2009 +0200
@@ -36,6 +36,16 @@
 }
 
 /*
+ * Decode a single UTF-8-encoded character starting at p.
+ * The resulting Unicode value (in the range 0-0x10ffff) is returned,
+ * and len is set the the number of bytes in the UTF-8 encoding.
+ */
+uint_t a_Utf8_decode(const char* str, const char* end, int* len)
+{
+   return utf8decode(str, end, len);
+}
+
+/*
  * Write UTF-8 encoding of ucs into buf and return number of bytes written.
  */
 int a_Utf8_encode(unsigned int ucs, char *buf)