Created
July 13, 2010 21:54
-
-
Save earl/474596 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a simple hack to check if wcscoll(P) really does locale-sensitive collation | |
#include<wchar.h> | |
#include<stdio.h> | |
#include<locale.h> | |
int main(int argc, char **argv) { | |
setlocale(LC_ALL, argv[1]); | |
printf("%d\n", wcscoll(L"z", L"ö")); | |
return 0; | |
} | |
/* | |
$ gcc wcscoll.c | |
$ ./a.out sv_SE.UTF-8 | |
-3 | |
$ ./a.out de_DE.UTF-8 | |
11 | |
$ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment