diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-01-18 14:05:12 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-01-18 14:05:12 +0100 |
commit | 18bf1b905871fe7b5509f9bc262b978e33f506a7 (patch) | |
tree | df375f6598e6c5332b529937b0d83820cd158f1a | |
parent | 54554ca531d018b965cc04fe5046e7df68eb27f9 (diff) |
UTIL: Add UTF-8 NFC testdev/schanzen/gns_nfc
-rw-r--r-- | src/util/test_strings.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/test_strings.c b/src/util/test_strings.c index d986486d0..1ecd31464 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c @@ -111,6 +111,13 @@ main (int argc, char *argv[]) GNUNET_break (0); return 1; } + /* Normalization */ + r = "q\u0307\u0323"; /* Non-canonical order */ + + GNUNET_STRINGS_utf8_normalize (r, + buf); + GNUNET_assert (0 == strcmp ("q\u0323\u0307", buf)); + b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "ASCII"); WANT ("TEST", b); |