I tried to leave a comment about this earlier, but I suppose my phone failed to send it.

My nit with this is that "comparison" functions are generally used for sorting, and you don't provide a means to do that (besides that, sorting a unicode string can be a fair bit more complex than sorting a C string). Typically, the compare functions will return < 0 if string A is before string B in sort order, and > 0 if string B is before string A in sort order, and 0 if they are equal.

My thoughts are that this will be very complicated to implement for unicode strings, so perhaps we shouldn't use a name like compare and instead use is_equal, to prevent the assumption that it can be used as a comparator for sorting algorithms.