root@eric-laptop:/home/eric/cppcookbook# strace ./a.out en_US.utf8 execve("./a.out", ["./a.out", "en_US.utf8"], [/* 24 vars */]) = 0 brk(0) = 0x856a000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78a6000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=87362, ...}) = 0 mmap2(NULL, 87362, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7890000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libstdc++.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200.\4\0004\0\0 \0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=4806582, ...}) = 0 mmap2(NULL, 943052, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3d1000 mprotect(0x4ab000, 4096, PROT_NONE) = 0 mmap2(0x4ac000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0xda) = 0x4ac000 mmap2(0x4b1000, 25548, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_ANONYMOUS, -1, 0) = 0x4b1000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/tls/i686/cmov/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`4\0\0004\0\0 \0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=149392, ...}) = 0 mmap2(NULL, 151680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xd6d000 mmap2(0xd91000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x23) = 0xd91000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libgcc_s.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\36\0\0004\0 \0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=471143, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb788f000 mmap2(NULL, 111692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xd32000 mmap2(0xd4d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x1a) = 0xd4d000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000m\1\0004\0\0 \0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1405508, ...}) = 0 mmap2(NULL, 1415592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xe0e000 mprotect(0xf61000, 4096, PROT_NONE) = 0 mmap2(0xf62000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x153) = 0xf62000 mmap2(0xf65000, 10664, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_ANONYMOUS, -1, 0) = 0xf65000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb788e000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb788e6d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xf62000, 8192, PROT_READ) = 0 mprotect(0xd91000, 4096, PROT_READ) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb788d000 mprotect(0x4ac000, 16384, PROT_READ) = 0 mprotect(0x816000, 4096, PROT_READ) = 0 munmap(0xb7890000, 87362) = 0 brk(0) = 0x856a000 brk(0x858b000) = 0x858b000 open("unicode.txt", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78a5000 write(1, "trying to access locale en_US.ut"..., 35trying to access locale en_US.utf8 ) = 35 write(2, "Couldn't generate locale ", 25Couldn't generate locale ) = 25 write(2, "en_US.utf8", 10en_US.utf8) = 10 write(2, ": ", 2: ) = 2 write(2, "locale::facet::_S_create_c_local"..., 48locale::facet::_S_create_c_locale name not valid) = 48 write(2, "\n", 1 ) = 1 write(2, "Error when writing to file", 26Error when writing to file) = 26 write(2, "\n", 1 ) = 1 close(3) = 0 exit_group(0) = ? root@eric-laptop:/home/eric/cppcookbook#