ORACLE在HP-UX下的系列問題處理(16)
2024-08-29 13:39:47
供稿:網友
NLS:法文字符顯示不正確問題描述
我用下面的SQL(結構化查詢語言)查詢語句從Oracle數據庫中檢索數據:
macdev::/mac/HAHTsite [ 91 ] >more t1.sql
select * from tmpbo where no_inf_ad = 172;
我運行查詢語句,將輸出發送到文件中:
sqlplus www/www < t1.sql > t2
在該文件上執行more命令時,法文字符出現亂碼;當我在同一個文件上執行cat時,字符顯示正常。
如何解決這個問題?
配置信息
操作系統 - HP-UX
版本 - 10.20
硬件系統 - PA9000
系列 - D370
應用程序 - Oracle 7.3.2.3.0
解決方法
你可以用下面的腳本打開一個本地hpterm窗口,解決這個問題。本地hpterm窗口答應你顯示Oracle數據庫的輸出。
#!/bin/ksh
# Open a hpterm to use iso-french:
LANG=fr_FR.iso88591
eXPort LANG
hpterm -xrm "*keyboardLanguage: French" -fn -bitstream-PRestige-medium-r-normal-19-160-72-72-m-110-iso8859-1
由于Oracle輸出中沒有顯示控制字符,因此你應當能夠顯示Oracle數據庫的輸出。
.........following with all English text ....
Problem Description
I am retrieving data from an Oracle database with this SQL (StrUCtured
Query Language) query:
macdev::/mac/HAHTsite [ 91 ] >more t1.sql select * from tmpbo where no_inf_ad = 172;
I run the query to send the output to a file:
sqlplus www/www < t1.sql > t2
When I do a more on that file, the French characters are garbled. When I do a cat on the same file, the characters display as they should.
How can I resolve this problem?
Configuration Info
Operating System - HP-UX
Version - 10.20
Hardware System - PA9000
Series - D370
application - Oracle 7.3.2.3.0
Solution
You can resolve your problem by using the following script to open a localized hpterm window. The localized hpterm window allows you to display your output from the Oracle database.
#!/bin/ksh
# Open a hpterm to use iso-french:
LANG=fr_FR.iso88591
export LANG
hpterm -xrm "*keyboardLanguage: French" -fn -bitstream-prestige-medium-r-normal-19-160-72-72-m-110-iso8859-1
Since there are no display control characters in the Oracle output, you should be able to display your output from the Oracle database.