Include CNS 11643 in the cstable diagnostic utility.
[sgt/charset] / cstable.c
index 1336aac..29deceb 100644 (file)
--- a/cstable.c
+++ b/cstable.c
@@ -24,8 +24,8 @@ int main(void)
 {
     long int c;
 
-    for (c = 0; c < 0x10000; c++) {
-       int i, row, col;
+    for (c = 0; c < 0x30000; c++) {
+       int i, plane, row, col;
        char const *sep = "";
 
        printf("U+%04x:", c);
@@ -68,6 +68,11 @@ int main(void)
            sep = ";";
        }
 
+       if (unicode_to_cns11643(c, &plane, &row, &col)) {
+           printf("%s CNS11643", sep);
+           sep = ";";
+       }
+
        if (!*sep)
            printf(" unicode-only");