]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/include/ape/utf.h
ape: move strdup() from libbsd to libap (from sources)
[plan9front.git] / sys / include / ape / utf.h
index bba977100434fb8591b24df0f249439b35cc5707..c78b94fee13d83cba18ec32bbf4fb340a144cb86 100644 (file)
@@ -7,15 +7,15 @@
 extern "C" { 
 #endif
 
-typedef unsigned short Rune;   /* 16 bits */
+typedef unsigned int Rune;     /* 32 bits */
 
 enum
 {
-       UTFmax          = 3,            /* maximum bytes per rune */
+       UTFmax          = 4,            /* maximum bytes per rune */
        Runesync        = 0x80,         /* cannot represent part of a UTF sequence (<) */
        Runeself        = 0x80,         /* rune and UTF sequences are the same (<) */
        Runeerror       = 0xFFFD,       /* decoding error in UTF */
-       Runemax         = 0xFFFF,       /* 16 bit rune */
+       Runemax         = 0x10FFFF,     /* 21 bit rune */
 };
 
 /*