From: park@casbah.acns.nwu.edu (Yongsup Park)
Newsgroups: soc.culture.korean
Subject: Re: An alt.korean.text anyone ?
Date: 3 Sep 92 17:30:00 GMT
Article-I.D.: news.1992Sep3.173000.11278
Organization: Northwestern University, Evanston Illinois.

In article <1992Sep03.043448.5447@eng.umd.edu> dskim@eng.umd.edu (Daeshik Kim) writes:

>	As I type in insert mode with hangul mode, I can type
>	hangul character (2 bytes); and as I complete 2 bytes,
>	it will show as hex-sequence in insert mode.

Hmm .. you better get hvi(or kvi) which is a modified version of vi and
it shows HanGul in any mode correctly if you use it on hanterm.

>>You only have to set PAGER and EDITOR properly. 
>
>	Aha! Pipe!
>	Is there any institute that governs such thing in Korea?
>	If so, is there any standard algorithm or I/O spec?
>	If so, what's the standard encoder/decoder pair?
>	I guess it's not using uu(en/de)code alogorithm and
>	should be able to detect English & encoded Hangul(?).

I'm not quite sure what you mean here but let me just state what I know.
There are several HanGul coding system as most of you may already well
aware.  The official one is KS5601(Wan-Sung-Hyung) which can represent 
about 1/4 of all possible combatination of the HanGul.  Though the 
revision of this standard is pending, most of the system supports this
coding system right now.   Hanterm, hvi, SunOS KLE(Korean Language 
Environment), HanGul MS Windows 3.0, all support KS code.  But when one 
wants to send KS encoded HanGul through the net(mail or news) problem
arises since KS code uses all 8 bits in a byte and MSB is stripped when KS 
code goes through the net in many cases.  So to avoid this, there is 
another coding system called ISO(which I think is not very much different 
from KS. Note that I don't know the details of any of the coding system.
I only know which one works in a given situation.)  Hanterm can display 
ISO encoded HanGul as well as KS encoded one.   But hvi can't handle ISO 
coded HanGul.  There are couple other coding system, i.e., n-byte system 
used in ked and Jo-Hap-Hyung system used in many MS-DOS HanGul WPs.  
Since Jo-Hap-Hyung can display all possible combinatin of 
HanGul(about 11700 characters ?), many people supports this and there 
seems to be a move to establish this system as a national standard.

So, how to handle all these ?
First of all there is a code coverter from all of the above mentioned 
codes to all the other.  It's called hcode written by Lee Jun-Yup at NYU.
It's available from kum.kaist.ac.kr.  Now if you only have an ordinary elm
(as opposed to HanGul patched elm), and vi but runs them on hanterm,
you can set pager option in .elm/elmrc file from 'builtin+' to 'more',
then you can see ISO coded HanGul inside elm, but can't edit it inside elm
since vi can't handle ISO.  You may save the mail through hcode pipe and
edit it with vi and reconvert to ISO using hcode and send it.  I thought it
was crazy(well, in  fact I did it many time, not with vi but with ked which
uses n-byte code). So I pulled out HanGul patched nemacs from kum(I
think, Sun4 binary was available).  Since HanGul nemacs can handle both 
KS and ISO like hanterm, all the problems are solved after setting pager 
to more and editor to nemacs in .elm/elmrc.   But still you have to be 
careful not to send KS file through net since nemacs creates KS HanGul 
if you start from scratch or start from KS encoded file(You can't tell 
whether it's KS or ISO since hanterm and nemacs just shows HanGul 
characters in both cases).
What would you do if you don't have hanterm and have no capability to
insatall it(e.g., ASCII terminal users) ?  Well, there is one soultion
though it's IMO ugly.  The above mentioned hcode can convert from all the
HanGul coding system to romanized HanGul.  So if you use 'hcode -ir' pipe
in elm, you can see the romanized HanGul on ASCII terminal screen.
This romanization rule is not an offical one(There was an agreement between
N&S Korea recently on the romanization rule of HanGul and it was submitted
to a international organization).  

Well, this is about it ..   ah !  there is a HanGul patched 'talk' you can
use on hanterm.  He .. it was nice to 'talk' with my friends in Korea in
HanGul.

Cheers !
-- 
----
Yongsup Park                 / park@casbah.acns.nwu.edu / Why do I insist on
Physics and Astronomy Dept. / park@anmsd3.msd.anl.gov  / AT&T ?  Because they 
Northwestern University    / B40180@ANLCV1.BITNET     / hire physicists.
Newsgroups: soc.culture.korean