0 0

en_US.UTF-8和zh_CN.UTF-8之间是什么区别?15

最近装linux系统,有时会出乱码,有人建议和编码方式有关。
网上查了下,还是有点搞不清en_US.UTF-8和zh_CN.UTF-8两者到底在什么地方有差别,希望能给予指点。
顺便,还有哪些资料可以看下?

问题补充:参考资料:http://en.wikipedia.org/wiki/UTF-8

问题补充:谢谢blogzhoubo的回复。不过在我的arch系统上,有这么个情况,当我把LANG的的值设为zh_CN.UTF-8时,系统软件pacman以及自带的编辑软件nano上能正常显示的英文变成了乱码,这是什么原因?
乱码图片见 http://i.imgur.com/ywoYR.jpg

问题补充:archlinux的版本是archlinux-2012.10.06-dual.iso,从emule上下载的,看着不太像是汉化的。
除了汉化之外,会不会有其它可能的原因?
2012年11月20日 20:11

4个答案 按时间排序 按投票排序

1 0

en_US.UTF-8:你说英语,你在美国,字符集是utf-8
zh_CN.UTF-8:你说中文,你在中国,字符集是utf-8

如果你的LANG环境变量是en_US.UTF-8,那么系统的菜单、程序的工具栏语言、输入法默认语言就都是英文的。

如果你的LANG环境变量是zh_CN.UTF-8,那么系统的菜单、程序的工具栏语言、输入法默认语言就都是中文的。

2012年11月20日 21:12
0 0

在显示字符时,en_US.UTF-8和zh_CN.UTF-8会在不同的目录寻找一个叫LC_IDENTIFICATION的文件。如果找不到,要显示的字符又不是ASCII,会出现乱码。贴一下自己遇到的问题吧。注意两次write()系统调用。


**********************************************************
*           All rights reserved (2005-2013)              *
*      Without the owner's prior written consent,        *
* no decompiling or reverse-engineering shall be allowed.*
*     When root privilege required, use sudo instead     *
*   For technical support, contact sysop@yy.com    *
*           Server Role:C 2013-09-30-18:00:02            *
**********************************************************
Last login: Mon Sep 30 18:05:43 2013 from
fool@ubuntu:~$ export LANG=zh_CN.UTF-8
fool@ubuntu:~$ strace ls
execve("/bin/ls", ["ls"], [/* 26 vars */]) = 0
brk(0)                                  = 0x179d000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5079000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=54786, ...}) = 0
mmap(NULL, 54786, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f82a506b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=121936, ...}) = 0
mmap(NULL, 2221680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a4c3a000
mprotect(0x7f82a4c57000, 2093056, PROT_NONE) = 0
mmap(0x7f82a4e56000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x7f82a4e56000
mmap(0x7f82a4e58000, 1648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f82a4e58000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31752, ...}) = 0
mmap(NULL, 2128984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a4a32000
mprotect(0x7f82a4a39000, 2093056, PROT_NONE) = 0
mmap(0x7f82a4c38000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f82a4c38000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\33\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31096, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a506a000
mmap(NULL, 2126312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a482a000
mprotect(0x7f82a4831000, 2093056, PROT_NONE) = 0
mmap(0x7f82a4a30000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f82a4a30000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1811128, ...}) = 0
mmap(NULL, 3925208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a446b000
mprotect(0x7f82a4620000, 2093056, PROT_NONE) = 0
mmap(0x7f82a481f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4000) = 0x7f82a481f000
mmap(0x7f82a4825000, 17624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f82a4825000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0
mmap(NULL, 2109704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a4267000
mprotect(0x7f82a4269000, 2097152, PROT_NONE) = 0
mmap(0x7f82a4469000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f82a4469000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=135366, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5069000
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a404a000
mprotect(0x7f82a4062000, 2093056, PROT_NONE) = 0
mmap(0x7f82a4261000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f82a4261000
mmap(0x7f82a4263000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f82a4263000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\17\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18552, ...}) = 0
mmap(NULL, 2113736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f82a3e45000
mprotect(0x7f82a3e49000, 2093056, PROT_NONE) = 0
mmap(0x7f82a4048000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f82a4048000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5068000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5066000
arch_prctl(ARCH_SET_FS, 0x7f82a50667c0) = 0
mprotect(0x7f82a481f000, 16384, PROT_READ) = 0
mprotect(0x7f82a4048000, 4096, PROT_READ) = 0
mprotect(0x7f82a4261000, 4096, PROT_READ) = 0
mprotect(0x7f82a4469000, 4096, PROT_READ) = 0
mprotect(0x7f82a4a30000, 4096, PROT_READ) = 0
mprotect(0x7f82a4c38000, 4096, PROT_READ) = 0
mprotect(0x7f82a4e56000, 4096, PROT_READ) = 0
mprotect(0x618000, 4096, PROT_READ)     = 0
mprotect(0x7f82a507b000, 4096, PROT_READ) = 0
munmap(0x7f82a506b000, 54786)           = 0
set_tid_address(0x7f82a5066a90)         = 29162
set_robust_list(0x7f82a5066aa0, 0x18)   = 0
futex(0x7fff084cff6c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f82a50667c0) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7f82a4050750, [], SA_RESTORER|SA_SIGINFO, 0x7f82a4059cb0}, NULL, = 0
rt_sigaction(SIGRT_1, {0x7f82a40507e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f82a4059cb0}, NULL, = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
statfs("/selinux", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=7382037, f_bfree=6560931, f_bavail=6185943, f_files=1875968, f_ffree=1784622, f_fsid={1794722143, 1461022304}, f_namelen=255, f_frsize=4096}) = 0
brk(0)                                  = 0x179d000
brk(0x17be000)                          = 0x17be000
open("/proc/filesystems", O_RDONLY)     = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5078000
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 310
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7f82a5078000, 4096)            = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2502288, ...}) = 0
mmap(NULL, 2502288, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f82a3be2000
close(3)                                = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5078000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f82a5078000, 4096)            = 0
open("/usr/lib/locale/zh_CN.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/zh_CN.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/zh_CN/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/zh.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/zh.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/zh/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/zh_CN.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/zh_CN.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/zh_CN/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/zh.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/zh.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/zh/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=75, ws_col=237, ws_xpixel=0, ws_ypixel=0}) = 0
openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 12 entries */, 32768)    = 376
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f82a5078000
write(1, "??????????????????.txt\n", 23??????????????????.txt
) = 23
close(1)                                = 0
munmap(0x7f82a5078000, 4096)            = 0
close(2)                                = 0
exit_group(0)                           = ?
fool@ubuntu:~$ export LANG=en_US.UTF-8
fool@ubuntu:~$ strace ls
execve("/bin/ls", ["ls"], [/* 26 vars */]) = 0
brk(0)                                  = 0x1ab0000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd759a2000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=54786, ...}) = 0
mmap(NULL, 54786, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffd75994000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=121936, ...}) = 0
mmap(NULL, 2221680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd75563000
mprotect(0x7ffd75580000, 2093056, PROT_NONE) = 0
mmap(0x7ffd7577f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x7ffd7577f000
mmap(0x7ffd75781000, 1648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffd75781000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31752, ...}) = 0
mmap(NULL, 2128984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd7535b000
mprotect(0x7ffd75362000, 2093056, PROT_NONE) = 0
mmap(0x7ffd75561000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ffd75561000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\33\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31096, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd75993000
mmap(NULL, 2126312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd75153000
mprotect(0x7ffd7515a000, 2093056, PROT_NONE) = 0
mmap(0x7ffd75359000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ffd75359000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1811128, ...}) = 0
mmap(NULL, 3925208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd74d94000
mprotect(0x7ffd74f49000, 2093056, PROT_NONE) = 0
mmap(0x7ffd75148000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4000) = 0x7ffd75148000
mmap(0x7ffd7514e000, 17624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffd7514e000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0
mmap(NULL, 2109704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd74b90000
mprotect(0x7ffd74b92000, 2097152, PROT_NONE) = 0
mmap(0x7ffd74d92000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ffd74d92000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=135366, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd75992000
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd74973000
mprotect(0x7ffd7498b000, 2093056, PROT_NONE) = 0
mmap(0x7ffd74b8a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7ffd74b8a000
mmap(0x7ffd74b8c000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffd74b8c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\17\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18552, ...}) = 0
mmap(NULL, 2113736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffd7476e000
mprotect(0x7ffd74772000, 2093056, PROT_NONE) = 0
mmap(0x7ffd74971000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7ffd74971000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd75991000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd7598f000
arch_prctl(ARCH_SET_FS, 0x7ffd7598f7c0) = 0
mprotect(0x7ffd75148000, 16384, PROT_READ) = 0
mprotect(0x7ffd74971000, 4096, PROT_READ) = 0
mprotect(0x7ffd74b8a000, 4096, PROT_READ) = 0
mprotect(0x7ffd74d92000, 4096, PROT_READ) = 0
mprotect(0x7ffd75359000, 4096, PROT_READ) = 0
mprotect(0x7ffd75561000, 4096, PROT_READ) = 0
mprotect(0x7ffd7577f000, 4096, PROT_READ) = 0
mprotect(0x618000, 4096, PROT_READ)     = 0
mprotect(0x7ffd759a4000, 4096, PROT_READ) = 0
munmap(0x7ffd75994000, 54786)           = 0
set_tid_address(0x7ffd7598fa90)         = 29218
set_robust_list(0x7ffd7598faa0, 0x18)   = 0
futex(0x7fffa6bfdb3c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7ffd7598f7c0) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7ffd74979750, [], SA_RESTORER|SA_SIGINFO, 0x7ffd74982cb0}, NULL, = 0
rt_sigaction(SIGRT_1, {0x7ffd749797e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7ffd74982cb0}, NULL, = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
statfs("/selinux", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=7382037, f_bfree=6560942, f_bavail=6185954, f_files=1875968, f_ffree=1784622, f_fsid={1794722143, 1461022304}, f_namelen=255, f_frsize=4096}) = 0
brk(0)                                  = 0x1ab0000
brk(0x1ad1000)                          = 0x1ad1000
open("/proc/filesystems", O_RDONLY)     = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd759a1000
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 310
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7ffd759a1000, 4096)            = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2502288, ...}) = 0
mmap(NULL, 2502288, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffd7450b000
close(3)                                = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=75, ws_col=237, ws_xpixel=0, ws_ypixel=0}) = 0
openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 12 entries */, 32768)    = 376
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26258, ...}) = 0
mmap(NULL, 26258, PROT_READ, MAP_SHARED, 3, 0) = 0x7ffd7599b000
close(3)                                = 0
futex(0x7ffd7514db10, FUTEX_WAKE_PRIVATE, 2147483647) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffd7599a000
write(1, "\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt\n", 23新建文本文档.txt
) = 23
close(1)                                = 0
munmap(0x7ffd7599a000, 4096)            = 0
close(2)                                = 0
exit_group(0)                           = ?
fool@ubuntu:~$

2013年9月30日 18:16
0 0

http://pengyan5945.iteye.com/blog/1711180

2012年11月21日 09:27
0 0

pacman本来是只支持英文的,后来有汉化版,你用的应该是汉化后的版本,乱码的原因应该是在汉化的时候用的不是UTF-8字符编码,所以你用UTF-8解码的话,就会有乱码。

2012年11月20日 22:18

相关推荐

    解决LINUX LITE方块乱码的中文字体

    2.选择语言编码,默认已选择en_US.UTF8,zh_CN UTF-8 UTF-8,用空格键将以下两项打上星号,zh_CN GB2312,zh_CN GBK GBK,回车确认。 3.选择系统默认语言为英文en_US.UTF8 4.为当前用户配置默认语言为中文zh_CN UTF-...

    navicat120_mysql_en_x64.tar.gz

    Ubuntu Navicat for MySQL 将压缩文件拷贝到ubuntu系统/usr/local/navicat...将export LANG="en_US.UTF-8"改为export LANG="zh_CN.UTF-8" 问题二:试用期 解决:删除用户目录下的.navicat64目录 cd ~ rm -r .navicat64

    navicat121_premium_en_x64.tar.gz

    Ubuntu Navicat for MySQL 将压缩文件拷贝到ubuntu系统/usr/local/navicat...将export LANG="en_US.UTF-8"改为export LANG="zh_CN.UTF-8" 问题二:试用期 解决:删除用户目录下的.navicat64目录 cd ~ rm -r .navicat64

    navicat121_premium_cs_x64.tar.gz

    找到文件里面的语言设置,由原来的en_US.UTF-8 改为 zh_CN.uft8: #!/bin/sh cd `dirname "$0"` navicat_root=`pwd` # Wine environment variables WINEDIR="wine" #export LANG="en_US.UTF-8

    如何在Ubuntu Linux系统的英文界面下处理中文

    在英文界面下处理中文,我们需要将locale设置为支持中文的类型,如UTF-8编码的简体中文(zh_CN.UTF-8)。 要进行locale设置,我们需要编辑系统级的环境变量配置文件。打开终端并使用管理员权限编辑`/etc/...

    navicat112_mysql_x64_centos.zip

    centos Navicat for MySQL:亲测有效 将压缩文件拷贝到ubuntu系统/usr...将export LANG="en_US.UTF-8"改为export LANG="zh_CN.UTF-8" 问题二:试用期去除 解决:删除用户目录下的.navicat64目录 cd ~ rm -rf .navicat64

    kali linux修改系统语言为中文的方法

    - `en_US.UTF-8` (英文) - `zh_CN.GBK` 或 `zh_CN.UTF-8` (中文) 其中,`zh_CN.UTF-8` 是推荐的选择,因为它使用UTF-8编码,可以更好地支持各种中文字符。 4. **设置默认语言** 完成语言选择后,继续按提示...

    Linux 中文网页乱码完美解决方案

    SUPPORTED="en_US.UTF-8:en_US:en" SYSFONT="latarcyrheb-sun16" ``` 修改为: ```bash LANG="en_US.UTF-8" SUPPORTED="zh_CN.UTF-8:zh_CN:zh" SYSFONT="latarcyrheb-sun16" ``` 这里,`LANG`变量保持不变,仍...

    CentOS 5.7中文乱码问题解决方案.docx

    将 LANG 变量修改为 zh_CN.GB18030,LANGUAGE 变量修改为 zh_CN.GB18030:zh_CN.GB2312:zh_CN,SUPPORTED 变量修改为 zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en。 SYSFONT 变量修改为 lat0-sun16。 修改后的配置...

    tera term中文乱码问题

    SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" ``` 3. 修改后的配置2: ``` LANG="en_US.UTF-8" SUPPORTER="en_US.UTF-8:en_US:zh" SYSFONT="latarcyrheb-sun16" ``` ...

    linux字符集介绍写的比较详细

    SUPPORTED="zh_CN.UTF-8:zh_CN:zh:zh_TW.UTF-8:zh_TW:zh:en_US.UTF-8:en_US:en" ``` - 在某些情况下,还需要修改`.i18n`文件以确保用户的环境变量符合新的字符集设置。 **2. 文件编码转换:** - 使用`iconv`命令...

    linux乱码解决.pdf

    在_FC4 Linux系统中,i18n文件中的LANG变量设置为“zh_CN.UTF-8”,SYSFONT变量设置为“latarcyrheb-sun16”,SUPPORTED变量设置为“zh_CN.UTF-8:zh_CN:zh”。这些设置决定了系统的默认语言和字体。 要解决中文乱码...

    SecureCRT中文显示乱码问题的解决方法

    问题:vi编辑器编辑文件时文件中的内容中文显示乱码,但是直接使用linux系统terminal...如: LANG=”zh_CN.UTF-8″ 或者是 LANG=”en_US.UTF-8″ 本文修改为后者 2、修改Secure CRT的Session Options Options->Session

    Kali Rolling解决中文乱码问题.docx

    进入图形化界面后,选择 en_US.UTF-8 和 zh_CN.UTF-8,然后将 en_US.UTF-8 设置为默认。 3. 安装中文字体,使用 apt-get install xfonts-intl-chinese 和 apt-get install ttf-wqy-microhei 命令来安装字体。 4. ...

    解决linux不能显示中文

    SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" # End real configurations ``` 这里设置了 `LANG`、`LANGUAGE` 和 `SUPPORTED` 环境变量来支持中文显示。注意,根据实际需求调整...

    让英文Linux系统显示和输入中文.pdf

    SUPPORTED="zh_CN.UTF-8:zh_CN:zh" ``` 其中 `LANG` 变量是 language 的简称,决定系统的默认语言,即系统的菜单、程序的工具栏语言、输入法默认语言等。`SYSFONT` 是 system font 的简称,决定系统默认用哪一种...

    linux系统语言修改方法

    SUPPORTED="zh_CN.UTF-8:zh_CN:zh en_US.UTF-8:en_US:en" ``` 这样,在登录系统时,用户可以选择系统显示的语言。 ### 3. 使用环境变量 LC_ALL 和 LANGUAGE 除了修改配置文件之外,还可以通过设置环境变量来临时...

    远程linux xshell下输出中文乱码解决方法

    SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" ``` 5. 保存并退出编辑器,然后重启系统以应用更改。注意,这可能会导致物理机上的终端命令行显示乱码,但如果仅通过远程连接...

    CentOS中文乱码问题

    SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" 然后,使用 yum 安装中文字体: #yum install fonts-chinese.noarch 重启系统或注销重新登录,所有界面将从英文变成中文。 三、...

    CentOS显示中文乱码.pdf

    SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" ``` 然后,使用yum命令安装fonts-chinese.noarch包: ``` # yum install fonts-chinese.noarch ``` 系统-> logout,重新登录CentOS...

Global site tag (gtag.js) - Google Analytics