Chinaunix首页 | 论坛 | 博客
  • 博客访问: 624370
  • 博文数量: 825
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-27 14:19
文章分类

全部博文(825)

文章存档

2011年(1)

2008年(824)

我的朋友

分类:

2008-10-27 14:27:10


  NLS:法文字符显示不正确问题描述
  
  我用下面的SQL(结构化查询语言)查询语句从数据库中检索数据:
  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
  应用程序 - 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.
  
  
  
  
  
  
  
  
【责编:admin】

--------------------next---------------------

阅读(323) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~