Description
This article is from the Hangul & Internet in Korea FAQ, by Jungshik Shin jshin@minerva.cis.yale.edu with numerous contributions by
others.
16. I've downloaded a Hangul terminal emulator and installed it, but I can't enter Hangul characters. (Hangul & Internet in Korea)
Please check if you have a 8-bit clean tty with 'stty' command (See manual
page of 'stty' for what options mean). On BSD compatible systems "stty
-istrip cs8" will make tty 8bit clean and on SunOS4.X, try executing "stty
pass8". On System V Unix(Solaris 2.x, Irix 5.x), you may have to execute
'stty -istrip -parenb cs8'. To make it executed everytime you log in, add
what follows to .cshrc/.tcshrc or .login in your home directory for csh/
tcsh
if ( $?prompt) then
stty -istrip -parenb cs8
# put here other commands for interactive shell
endif
setenv LC_CTYPE iso_8859_1 # or LATIN_1 in place of iso_8859_1
setenv LESSCHARDEF "8bcccbcc18b95.33b95.b" #to display Hangul text with less
setenv NOREBIND # in tcsh only
Bourn shell and its variants(descendants) like ksh and bash users have to
add to .profile or .bashrc(bash only) in their home directory
case $- in
*i*)
stty -istrip -parenb cs8
# put here other commands for interactive shell
esac
LC_CTYPE=iso_8859_1
LESSCHARDEF="8bcccbcc18b95.33b95.b" # display Hangul text with less
export LC_CTYPE LESSCHARDEF
Note that the line with 'stty' may have to be changed accordingly depending
on flavor of Unix as mentioned above. [Contribution by Choi,Woohyung
(whchoi@cosmos.kaist.ac.kr) and Kim, Daeshik(dkim@cwc.com)]. The value for
LC_CTYPE may be different under different flavor of Unixen. For instance, in
HP/UX, en_US.iso88591(the default value may work if you're not in the US or
UK since most European languages require 8bit characters and the default
should be set as such) is to be used instead of iso_8859_1 or LATIN1. In
case(not so likely outside Korea) Korean locale is available to you, the
environment variable LANG can be set to Korean (or KOREAN,ko, etc) or the
environment varialble LC_CTYPE to ko_KR.euc-kr(the exact name varies from
Unix to Unix. Check with 'locale' command or consult your system admin).
Even with this set up, you may not able to enter Hangul when connection to
Hangul Internet BBS or on-line service in Korea. That's because your
telnet/rlogin is not 8bit clean. Try rlogin or telnet with '-8'
option('rlogin -8'). Not all variants of telnet/rlogin support this option.
Some telnet honors 'set bin' in ~/.telnetrc so that you may add to
~/.telnetrc lines below. If not, you may escape back to 'telnet>' prompt at
which you can give 'set bin' to make it 8bit clean.
somewhere.net # address of host you want to connect 8bit-clean
set bin
By compiling tcsh with '8bit' and 'kanji' option(kanji option may not be
necessary depending on which variant of Unixen you use and whether it
supports Korea locale), you may even use Hangul at command line and in file
name tcsh. The safest bet for those abroad using Unix with locale/NLS
support but without Korean locale appears to be compiling tcsh with '8bit'
and 'kanji' option enabled and 'nls' option disabled. (Be careful not to
turn 'nokanji' option on. Keep it OFF for Hangul input. It's OFF by default
if kanji option is used at compile-time, so don't bother to play with it.)
Echoing the shell variable version(echo $version) shows you
compile-time options used for your tcsh binary. Below is the result on my
Linux box.
% echo $version
tcsh 6.06.00 (Cornell) 1995-05-13 (i386-unknown-linux) options 8b,dl,al,kan
Hangul can be used at command lines in bash compiled for Hangul available at
ftp://juno.kaist.ac.kr. This binary is for Linux only. Bash users may add
following lines to .inputrc in home directory. These options for ordinary
bash(not patched for Hangul) enable you to enter Hangul at command line and
use in file name.
set meta-flag On
set convert-meta Off
set output-meta On
set editing-mode vi
set show-all-if-ambiguous on
 
Continue to: