aboutsummaryrefslogtreecommitdiff
path: root/test/unicode_test.cc
blob: 3cd4371016e8f37f9ccbe0aa1620b0da5f3e6e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <string.h>
#include <stdio.h>
#include "../lout/unicode.hh"

using namespace lout::unicode;

int main (int argc, char *argv[])
{
   const char *t = "abcäöüабв−‐";

   for (const char *s = t; s; s = nextUtf8Char (s, strlen (s)))
      printf ("%3d -> U+%04x ('%s')\n", (int)(s - t), decodeUtf8(s), s);
   
   return 0;
}