An example of some unicode-utf8 transcoding.
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};
assert(utf8::size(u1) == 2);
assert(utf8::size(u2) == 3);
assert(utf8::count(u1) == 1);
assert(utf8::count(u2) == 1);
assert(utf8::codepoint(u1) == 0x00a9);
assert(utf8::codepoint(u2) == 0x2260);
return 0;
}
Top level include file for the GNU uCommon C++ core library.
Common namespace for all ucommon objects.