#include #include #include char src[] = { "A sample STRING" }; char dst[20]; void main() { char *prev_locale; size_t len; /* set native locale */ prev_locale = setlocale( LC_ALL, "" ); printf( "%s\n", prev_locale ); len = strxfrm( dst, src, 20 ); printf( "%s (%u)\n", dst, len ); }