[c] use calloc instead of malloc
[test] Added utf-8 test.