At least with macOS Sequoia 15.5 and Xcode 16.3:
$ cat test.cc
#include <locale.h>
#include <string.h>
#include <xlocale.h>
int main(void) {
locale_t l = newlocale(LC_ALL_MASK, "el_GR.UTF-8", 0);
strxfrm_l(NULL, "ό", 0, l);
return 0;
}
$ c99 test.c && ./a.out
Assertion failed: (p->val == key), function lookup_substsearch, file collate.c, line 596.
Abort trap: 6
Hmmmm, you’re tripping the assert on this line.
Honestly, I don’t know enough about the standard C library internationalisation APIs to say whether what you’re doing makes sense (most code for Apple platforms uses Foundation for internationalisation). However, I’m pretty sure this code shouldn’t be trapping, and thus I encourage you to file a bug about this.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"