Jquery中文网 www.jquerycn.cn
Jquery中文网 >  数据库  >  oracle  >  正文 Oracle10g EM乱码的解决方法

Oracle10g EM乱码的解决方法

发布时间:2014-07-20   编辑:www.jquerycn.cn
本文介绍 Oracle10g EM乱码 的解决方法,有遇到类似问题的朋友可以参考下。

如果安装时,我们系统环境变量设置的是中文环境,那么就不会有这个问题。
这个问题的根本原因在于安装时,JDK/JRE字符集的自动选择。

在 $ORACLE_HOME/jdk/jre/lib 和 $ORACLE_HOME/jre/1.4.2/lib/ 目录下都有多种字符集字体配置文件:
 

复制代码 代码示例:

[oracle@danaly ~]$ cd $ORACLE_HOME/jdk/jre/lib
[oracle@danaly lib]$ ls font*zh_CN*
font.properties.zh_CN.Redhat  font.properties.zh_CN.Redhat2.1 
font.properties.zh_CN.Sun  font.properties.zh_CN_UTF8.Sun

[oracle@danaly lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/
[oracle@danaly lib]$ ls font*zh_CN*
font.properties.zh_CN.Redhat  font.properties.zh_CN.Redhat2.1 
font.properties.zh_CN.Sun  font.properties.zh_CN_UTF8.Sun

我们只要用合适的中文字符集文件替换缺省文件即可,我选择使用font.properties.zh_CN.Redhat来替换缺省字体定义文件:
[oracle@danaly lib]$ cp font.properties.zh_CN.Redhat font.properties
替换之后需要清理一下Cache,重启EM即可。

Cache路径通常位于:
 

复制代码 代码示例:
$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs

清除所有gif文件即可。然后重新启动EM:
 

复制代码 代码示例:
[oracle@danaly zhs]$ emctl stop dbconsole
TZ set to PRC
oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 oracle Corporation.  All rights reserved.
http://danaly.hurrray.com.cn:1158/em/console/aboutApplication
Stopping oracle Enterprise Manager 10g Database Control ...
 ...  Stopped.
[oracle@danaly zhs]$ emctl start dbconsole
TZ set to PRC
oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 oracle Corporation.  All rights reserved.
http://danaly.hurrray.com.cn:1158/em/console/aboutApplication
Starting oracle Enterprise Manager 10g Database Control .............. started.
------------------------------------------------------------------
Logs are generated in directory
/opt/oracle/product/10.2.0/danaly.hurrray.com.cn_danaly/sysman/log 

现在登陆Web页面,EM显示就可以正常显示中文了.

注意:如果经过以上处理仍然不能正确显示中文,请参考以下说明:

打开刚替换好的font.properties,或者查看原有的中文字体文件:
 

复制代码 代码示例:
[oracle@smsdbrac1 lib]$ tail -2 font.properties.zh_CN.Redhat
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf

注意其中包含了filename指向中文字体文件,请确认该文件在你的服务器上是否存在,如果不存在,改换一个存在的中文字体文件即可,也可以自行下载安装新的字体文件:
 

复制代码 代码示例:
[oracle@smsdbrac1 lib]$ ls -al /usr/share/fonts/zh_CN/TrueType/zysong.ttf
-rw-r--r--  1 root root 9249332 Mar 29  2002 /usr/share/fonts/zh_CN/TrueType/zysong.ttf

您可能感兴趣的文章:
Oracle10g EM乱码的解决方法
php网页标题中文乱码如何解决
PHP date() 函数
mysql中utf-8编码数据库转换成GBK编码的问题
php pdo编码乱码问题的解决方法
shell脚本中注释中文乱码的解决方法
php分割GBK中文乱码的解决方法
php截取中文字符串乱码如何解决呢
php读取mysql中文乱码解决方法
解决php json_encode中文转码、乱码问题

[关闭]