2 Replies Latest reply: May 2, 2012 10:21 PM by HuaMin Chen RSS

    Displaying Chinese characters in SQL*Plus

    878923
      DB version: 11.2
      OS Version : AIX 6.1

      DB characterset:AL32UTF8

      To display chinese characters in SQL*Plus, I did the following:
      $ export LANG=zh_CN.UTF-8
      $ export LC_ALL=zh_CN.GB2312
      $ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
      $ 
      
      $ sqlplus / as sysdba
      
      SQL*Plus: Release 11.2.0.2.0 Production on ÐÇÆÚÈý 5ÔÂ 2 15:52:33 2012
      
      Copyright (c) 1982, 2010, Oracle.  All rights reserved.
      
      
      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
      With the Partitioning option
      
      SQL> ALTER SESSION SET NLS_LANGUAGE='SIMPLIFIED CHINESE';
      
      Session altered.
      
      SQL> ALTER SESSION SET NLS_TERRITORY='CHINA';
      
      Session altered.
      
      SQL> select unistr('\8349') from dual;  ---- not 100% sure if this is the way to verify if chinese characters can be displayed.
      
      UN
      --               
      ²Ý                 ----------------------------------------> Getting a junk character instead of chinese 
      If I was using putty, are the above steps enough to get chinese characters displayed ?
      Our ssh client is Tectia (not putty).
      According the below ML Note, the SSH client has to configured correctly to use globalization features.
      +The correct NLS_LANG setting in Unix Environments [ID 264157.1]+
      Googling "Tectia + Chinese" didn't return useful results
        • 1. Re: Displaying Chinese characters in SQL*Plus
          Sergiusz Wolicki-Oracle
          I understand that you are talking about Windows SSH Client.

          For Putty, you should set:

          $ export LANG=zh_CN.UTF-8
          $ export LC_ALL=zh_CN.UTF-8
          $ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

          and configure Putty in Window->Translation to use UTF-8.

          There is nothing about this subject on Tectia website and in their manuals, so my best guess is that the client requires Windows code page to work correctly. In such case you need to set your Windows system default locale (locale for non-Unicode programs) to Chinese and use the following settings on the server:

          $ export LANG=zh_CN.GBK
          $ export LC_ALL=zh_CN.GBK
          $ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"


          Verify with 'locale -a' that the setting zh_CN.GBK is supported on your system.


          -- Sergiusz
          • 2. Re: Displaying Chinese characters in SQL*Plus
            HuaMin Chen
            Can you try Sql developer to see the Chinese?