I'm adding functions for comparing Unicode strings, while ignoring their normalization form.
2009-03-06 Bruno Haible <br...@clisp.org> New module 'uninorm/u32-normcmp'. * lib/uninorm/u32-normcmp.c: New file. * modules/uninorm/u32-normcmp: New file. New module 'uninorm/u16-normcmp'. * lib/uninorm/u16-normcmp.c: New file. * modules/uninorm/u16-normcmp: New file. New module 'uninorm/u8-normcmp'. * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp): New declarations. * lib/uninorm/u8-normcmp.c: New file. * lib/uninorm/u-normcmp.h: New file. * modules/uninorm/u8-normcmp: New file. *** lib/uninorm.h.orig 2009-03-06 19:20:21.000000000 +0100 --- lib/uninorm.h 2009-03-06 19:01:38.000000000 +0100 *************** *** 145,150 **** --- 145,165 ---- uint32_t *resultbuf, size_t *lengthp); + /* Compare S1 and S2, ignoring normalization. + NF must be either UNINORM_NFD or UNINORM_NFKD. + If successful, set *RESULT to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return the error number. */ + extern int + u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *result); + extern int + u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *result); + extern int + u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *result); + + /* Normalization of a stream of Unicode characters. A "stream of Unicode characters" is essentially a function that accepts an