Changeset View
Changeset View
Standalone View
Standalone View
tools/tools/locale/tools/getwidths.c
- This file was added.
#include <locale.h> | |||||
#include <stdio.h> | |||||
#include <utf8proc.h> | |||||
int | |||||
main(void) | |||||
{ | |||||
int32_t wc; | |||||
int i, wcw; | |||||
setlocale(LC_CTYPE, "C.UTF-8"); | |||||
printf("%s\n", utf8proc_version()); | |||||
for (wc = 0; wc < 0x110000; wc++) { | |||||
wcw = utf8proc_charwidth(wc); | |||||
if (wcw == 1) | |||||
continue; | |||||
printf("%04X %d\n", wc, wcw); | |||||
} | |||||
return (0); | |||||
} |