Document Type | Technical Information
Category | Administration
Applicable Product Versions | 4, 5, 6FS07, 6FS07PS, 7FS02, 7FS02PS
Document Number | TADTI144
Overview
This document explains how to set the Character Encoding when connecting to tbsql on Linux.
Method
1. Check and Set the OS LANG
Check the current LANG value of the OS account using the locale command.
[jibang@ZSS1 ~]$ locale LANG=ko_KR.UTF-8 LC_CTYPE="ko_KR.UTF-8" LC_NUMERIC="ko_KR.UTF-8" LC_TIME="ko_KR.UTF-8" LC_COLLATE="ko_KR.UTF-8" LC_MONETARY="ko_KR.UTF-8" LC_MESSAGES="ko_KR.UTF-8" LC_PAPER="ko_KR.UTF-8" LC_NAME="ko_KR.UTF-8" LC_ADDRESS="ko_KR.UTF-8" LC_TELEPHONE="ko_KR.UTF-8" LC_MEASUREMENT="ko_KR.UTF-8" LC_IDENTIFICATION="ko_KR.UTF-8" LC_ALL=
Note
You can change the setting with the command export LANG=desired Locale value or export LC_ALL=desired Locale value.
2. Change Terminal Program Settings
If the Encoding setting of the terminal program differs from the Locale value above, you may experience several issues such as the vi editor not working properly, or data entered in Korean appearing correctly on the screen but actually being corrupted.
It is recommended to change the terminal settings to match the Locale before proceeding.
1) Secure CRT
: Top menu Option > Session Options >
Left Category Terminal > Appearance > Character encoding
2) XShell
: Right-click session info > Properties > Terminal > Encoding
3) Putty
: In the settings window, left menu Window > Translation > Remote character set
3. tbsql Connection Settings
When connecting to tbsql, the TB_NLS_LANG setting in the tbdsn.tbr file is applied.
As with the terminal settings, you must set the TB_NLS_LANG value to match the Locale in order to properly load or query Korean data.