Dear advanced c/g++ programers: after I copied and compiled last email's code I tested it, with your suggestion (put POSIX and C behind it), they run (generate locale), but all test failed to make output file with size > 0 so if you can plz help again, and thank a lot in advance, Eric ------------------------------------------------------------ eric@eric-laptop:~/cppcookbook$ ./a.out trying to access locale el_GR.utf8 Couldn't generate locale el_GR.utf8: locale::facet::_S_create_c_locale name not valid Error when writing to file eric@eric-laptop:~/cppcookbook$ ls -l -a unicode.txt -rw-r--r-- 1 eric eric 0 2011-06-27 08:31 unicode.txt eric@eric-laptop:~/cppcookbook$ ./a.out POSIX trying to access locale POSIX Generated locale C Error when writing to file eric@eric-laptop:~/cppcookbook$ ./a.out C trying to access locale C Generated locale C Error when writing to file eric@eric-laptop:~/cppcookbook$ ./a.out B trying to access locale B Couldn't generate locale B: locale::facet::_S_create_c_locale name not valid Error when writing to file eric@eric-laptop:~/cppcookbook$ -------------------------------------------------------