[sword-svn] r2446 - trunk/include

scribe at crosswire.org scribe at crosswire.org
Sun Aug 23 17:43:27 MST 2009


Author: scribe
Date: 2009-08-23 17:43:27 -0700 (Sun, 23 Aug 2009)
New Revision: 2446

Modified:
   trunk/include/utilstr.h
Log:
commiting forgotten header file (thanks refdoc)


Modified: trunk/include/utilstr.h
===================================================================
--- trunk/include/utilstr.h	2009-08-23 19:55:37 UTC (rev 2445)
+++ trunk/include/utilstr.h	2009-08-24 00:43:27 UTC (rev 2446)
@@ -24,6 +24,7 @@
 
 #include <defs.h>
 #include <sysdata.h>
+#include <swbuf.h>
 
 SWORD_NAMESPACE_START
 
@@ -56,5 +57,19 @@
 __u32 getUniCharFromUTF8(const unsigned char **buf);
 
 
+/******************************************************************************
+ * assureValidUTF8 - iterates the supplied UTF-8 buffer and checks for validity
+ * 					replacing invalid bytes if necessary and returning a
+ *					verified UTF8 buffer, leaving the original input
+ *					unchanged.
+ *
+ * ENT:	buf - a utf8 buffer
+ *
+ * RET:	input buffer validated and any problems fixed by substituting a
+ * 		replacement character for bytes not valid.
+ */
+SWBuf assureValidUTF8(const char *buf);
+
+
 SWORD_NAMESPACE_END
 #endif




More information about the sword-cvs mailing list