Linux+Oracle 10g EM按鈕出現亂碼解決

來源:互聯網
上載者:User

在Linux環境中安裝Oracle 10g,啟用EM時,會出現按鈕顯示亂碼的現象,如下:


在網上找了找原因,原來是因為在安裝Oracle 10g時,JDK/JRE自動選擇了字元集,而在$ORACLE_HOME/jdk/jre/lib和$ORACLE_HOME/jre/1.4.2/lib目錄下,都有多種字型:

[oracle@ www.bkjia.com lib]$ cd /home/oracle/product/10g/jdk/jre/lib/                 
[oracle@ www.bkjia.com lib]$ ll *zh_CN*                                               
-rwxr-xr-x  1 oracle oinstall 6854 Apr 20  2005 font.properties.zh_CN.RedHat  
-rwxr-xr-x  1 oracle oinstall 7410 Apr 20  2005 font.properties.zh_CN.Redhat2.1
-rwxr-xr-x  1 oracle oinstall 6845 Apr 20  2005 font.properties.zh_CN.Sun     
-rwxr-xr-x  1 oracle oinstall 7137 Apr 20  2005 font.properties.zh_CN_UTF8.Sun
[oracle@ www.bkjia.com lib]$ cd /home/oracle/product/10g/jre/1.4.2/lib/               
[oracle@ www.bkjia.com lib]$ ll *zh_CN*                                               
-rwxr-xr-x  1 oracle oinstall 6854 Apr  6  2005 font.properties.zh_CN.Redhat  
-rwxr-xr-x  1 oracle oinstall 7410 Apr  6  2005 font.properties.zh_CN.Redhat2.1
-rwxr-xr-x  1 oracle oinstall 6845 Apr  6  2005 font.properties.zh_CN.Sun     
-rwxr-xr-x  1 oracle oinstall 7137 Apr  6  2005 font.properties.zh_CN_UTF8.Sun
 
而每一個目錄下都有一個預設的字元集font.properties,我們只要用合適的中文字元集來替換預設字元集即可,我
選擇的是font.properties.zh_CN.Redhat。
 
首先,我們應該先將em關閉
 
然後進行替換,注意,$ORACLE_HOME/jdk/jre/lib和$ORACLE_HOME/jre/1.4.2/lib目錄下都要進行如下替換
[oracle@ www.bkjia.com lib]$ cp font.properties.zh_CN.Redhat font.properties          
 
替換之後,我們還要查一下,linux中有沒有安裝相應的中文字元集,怎麼看?
 
[oracle@ www.bkjia.com lib]$ tail font.properties                                     
fontset.dialoginput.plain=\                                                   
-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1,\                      
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0                     
fontset.default=\                                                             
-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\                      
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0                     
filename.-misc-zysong18030-med ium-r-normal--*-%d-*-*-c-*-iso10646-             1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf                                  
 
根據最後一行的路徑,我們去看看是否有該檔案是否存在,如果沒有,那說明沒有安裝相應的中文字元集,我們可以到Linux的系統安裝盤中去找到相應的rpm包,進行安裝,我的Linux是RHEL4,安裝盤裡是ttfonts-zh_CN-2.14-6.noarch.rpm版本的字元集。
 
最後還要清理一下Cache,路徑一般是
 
ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs                                   
注意:只需要清理該路徑下的gif檔案即可。
 
最後再將em開啟,此時,我們發現,亂碼不見了,搞定!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.