An example of some unicode-utf8 transcoding.
#ifndef DEBUG
#define DEBUG
#endif
#include <stdio.h>
extern "C" int main()
{
char u1[] = {(char)0xc2, (char)0xa9, 0x00};
char u2[] = {(char)0xe2, (char)0x89, (char)0xa0, 0x00};
return 0;
}
Top level include file for the GNU uCommon C++ core library.
Common namespace for all ucommon objects.
static size_t count(const char *string)
Count ut8 encoded ucs4 codepoints in string.
static unsigned size(const char *codepoint)
Compute character size of utf8 string codepoint.
static ucs4_t codepoint(const char *encoded)
Convert a utf8 encoded codepoint to a ucs4 character value.