as5 10g em乱码解决

来源:互联网 发布:乐清知临与公立那个好 编辑:程序博客网 时间:2024/05/17 06:08

as4 与as5解决略有不同,as5 在/usr/share/fonts/ 下,没有zh_CN目录和中文字体。

 

关于网上解决OEM中文乱码的问题的方法很多,但是很多人试来试去还是没能解决,下面给大家介绍一种方法,很简单。

在目录$ORACLE_HOME/jdk/jre/lib和$ORACLE_HOME/jre/1.4.2/lib中决定字符集的文件是font.properties文件,因此,我只要用中文字符集的文件替换掉缺省的即可。

 

[oracle@ligle-dblib]$cd /u01/app/oracle/product/10.2.0/db_1/jdk/jre/lib


[oracle@ligle-dblib]$ls -l  font*zh_CN*
-rwxr-xr-x1 oracle oinstall 6854 Apr  3  2007font.properties.zh_CN.Redhat
-rwxr-xr-x1 oracle oinstall 7410 Apr  3  2007 font.properties.zh_CN.Redhat2.1
-rwxr-xr-x1 oracle oinstall 6920 Apr  3  2007font.properties.zh_CN.Redhat4
-rwxr-xr-x1 oracle oinstall 6845 Apr  3  2007font.properties.zh_CN.Sun
-rwxr-xr-x1 oracle oinstall 7137 Apr  3  2007font.properties.zh_CN_UTF8.Sun


[oracle@ligle-dblib]$cd /u01/app/oracle/product/10.2.0/db_1/jre/1.4.2/lib/


[oracle@ligle-dblib]$ls -l font*zh_CN*
-rwxr-xr-x1 oracle oinstall 6854 Apr 13  2007 font.properties.zh_CN.Redhat
-rwxr-xr-x1 oracle oinstall 7410 Apr 13 2007font.properties.zh_CN.Redhat2.1
-rwxr-xr-x1 oracle oinstall 6920 Apr 13  2007font.properties.zh_CN.Redhat4
-rwxr-xr-x1 oracle oinstall 6845 Apr 13  2007font.properties.zh_CN.Sun
-rwxr-xr-x1 oracle oinstall 7137 Apr 13 2007font.properties.zh_CN_UTF8.Sun


[oracle@ligle-dblib]$ls font.properties
font.properties


[oracle@ligle-dblib]$cp font.properties font.properties_bak01
[oracle@ligle-dblib]$cp font.properties.zh_CN.Redhat font.properties
[oracle@ligle-dblib]$cd /u01/app/oracle/product/10.2.0/db_1/jdk/jre/lib
[oracle@ligle-dblib]$cp font.properties.zh_CN.Redhat font.properties
[oracle@ligle-dblib]$cat font.properties
#%W% %E%
#Copyright 2002 Sun Microsystems, Inc. All rights reserved.
#

#Component Font Mappings For RedhatLinux 8.0/zh_CN

...省略...

直到最后一行...

filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf

在被替换后的字符集文件font.properties文件的最后一行,指定了字符集文件的路径及位置,如上:/usr/share/fonts/zh_CN/TrueType/zysong.ttf

我的环境是LINUX AS 5.3

[oracle@ligle-dblib]$ ls -l /usr/share/fonts/zh_CN/TrueType/zysong.ttf

ls:/usr/share/fonts/zh_CN/TrueType/zysong.ttf: No such file or directory

缺省是不存在的。

建立相应的目录和上传对应的字体文件:

[root@ligle-db~]# mkdir -p /usr/share/fonts/zh_CN/TrueType
[root@ligle-db~]# cd /usr/share/fonts/zh_CN/TrueType

上传字体文件,然后清理掉cache中的*.gif文件,重启em即可。字体文件可从网上下载

cache文件位于:
[oracle@ligle-dbzhs]$ pwd

/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs

原创粉丝点击