一,命令行出现乱码
先查看语言
[root@localhost Desktop]# env|grep LANG
LANG=zh_CN.UTF-8
不管三七二十一,运行这命令
unset LANG
就ok了,此命令式去掉语言,也就是不要语言,结果就是默认英文了,要设置为中文提示
用export LANG=zh_CN.gb18030
看实例:
[root@localhost ~]# pwd
/root
[root@localhost ~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog scsrun.log
[root@localhost ~]# cd D
-bash: cd: D: 娌℃湁閭d釜鏂囦欢鎴栫洰褰?
[root@localhost ~]# cd Desktop
[root@localhost Desktop]# lang
-bash: lang: command not found
[root@localhost Desktop]# LANG
-bash: LANG: command not found
[root@localhost Desktop]# env|grep LANG
LANG=zh_CN.UTF-8
[root@localhost Desktop]# unset LANG
[root@localhost Desktop]# cd d
-bash: cd: d: No such file or directory
[root@localhost Desktop]# set LANG=zh_CN.gb18030
[root@localhost Desktop]# cd d
-bash: cd: d: No such file or directory
[root@localhost Desktop]# unset LANG
[root@localhost Desktop]# env|grep LANG
[root@localhost Desktop]# set LANG=zh_CN.gb18030
[root@localhost Desktop]# env|grep LANG
[root@localhost Desktop]# export LANG=zh_CN.gb18030
[root@localhost Desktop]# env|grep LANG
LANG=zh_CN.gb18030
[root@localhost Desktop]# cd d
-bash: cd: d: 没有那个文件或目录
[root@localhost Desktop]#
set是设局部变量
export是设置全局变量
还有两条命令没去研究
env LANG="XXX"
env GDM_LANG="XXX"
二,别的软件乱码
我把从LINUX中DUMP出的数据(数据库是10.1.0)IMP到windows的oracle数据库中(数据库是10.2.0),有些汉字变成问号,比如,存储过程中的汉字注释,有应用程序查询出数据结果,有的汉字也显示为‘’???,说明:这两个数据库字符集都是zhs16gbk,客户端也是zhs16gbk,所以,就不知道原因在哪儿了,求高手,在线等
有人说用set NLS_LANG=american_america.ZHS16GBK
注册 表里面有两个地方 /oracle/nls_lang ;/oracle/homeo/nls_lang ...
我的经验是主要改homeo里面的那个。
是你export出来的数据有问题,把linux下oracle的字符集改为和window一致后,再exp之后imp就没有问题了
可以通过 select * from nls_database_parameters;
查看nls_characters是什么类型的
之后update props$ set valuse$='zh..'wheren name='nls_characters'
后就ok了
阅读(1640) | 评论(0) | 转发(0) |