Korean Solaris User's Guide

The iconv Utility

The iconv command converts the characters or sequences of characters in a file from one code set to another and writes the results to standard output. Korean Solaris software includes special filters for the iconv command.

If no conversion exists for a particular character, it is converted to the underscore _ in the target code set. The following options are supported:

The following code set conversion modules are supported in Korean Solaris software. For more information, see iconv(1).

Table 6–1 Korean iconv Code Conversion Modules (ko locale)

Easy Name from-code

Actual Name from-code

Easy Name to-code

Actual Name to-code

IBM CP933 

ko_KR.cp933 

UTF-8 (Unicode 3.2) 

ko_KR-UTF-8 

IBM CP933 

ko_KR.cp933 

UTF-8  

UTF-8 

ISO646 

646 

KS X 1001 

5601 

ISO2022–KR 

ko_KR.iso2022-7 

KS X 1001 

ko_KR-euc 

ISO2022–KR 

ko_KR.iso2022-7 

UTF-8 (Unicode 3.2) 

ko_KR-UTF-8 

ISO2022–KR 

ko_KR.iso2022-7 

UTF-8 

UTF-8 

KS X 1001 

5601 

UTF-8 

UTF-8 

KS X 1001 

EUC-KR 

UTF-8 

UTF-8 

KS X 1001 

KSC5601 

UTF-8 

UTF-8 

KS X 1001 

ko_KR-euc 

UTF-8 (Unicode 3.2) 

ko_KR-UTF-8 

KS X 1001 

ko_KR-euc 

UTF-8 (Unicode 3.2) 

ko_KR-UTF-8 

KS X 1001 

ko_KR.EUC 

UTF-8 

UTF-8 

KS X 1001 

ko_KR-euc 

KS X 1001 

ko_KR-johap 

KS X 1001 

ko_KR-euc 

KS X 1001 

ko_KR-johap92 

KS X 1001 

ko_KR-euc 

KS X 1001 

ko_KR-nbyte 

KS X 1001 

ko_KR-nbyte 

KS X 1001 

ko_KR-euc 

KS X 1001 

ko_KR-johap92 

UTF-8 (Unicode 3.2) 

ko_KR-UTF-8 

KS X 1001 

ko_KR-johap92 

KS X 1001 

ko_KR-euc 

UTF-8 

UTF-8 

KS X 1001 

5601 

UTF-8 

UTF-8 

KS X 1001 

KS X 1001 

UTF-8 

UTF-8 

KS X 1001 

EUC-KR 

UTF-8 

UTF-8 

KS X 1001 

KSC5601 

UTF-8 

ko-KR-UTF-8 

IBM CP933 

ko_KR.cp933 

UTF-8 

UTF-8 

IBM CP933 

ko_KR.cp933 

UTF-8 

ko-KR-UTF-8 

ISO2022-KR 

ko_KR-iso2022-7 

UTF-8 

UTF-8 

ISO2022-KR 

ko_KR-iso2022-7 

UTF-8 

UTF-8 

ISO2022-KR 

ISO2022-KR 

UTF-8 

ko-KR-UTF-8 

KS X 1001 

ko_KR-johap 

UTF-8 

UTF-8 

KS X 1001 

ko_KR-johap 

UTF-8 

ko-KR-UTF-8 

KS X 1001 

ko_KR-johap92 

UTF-8 

UTF-8 

KS X 1001 

ko_KR-johap92 

Wansung 

ko_KR-euc 

Johap 

ko_KR-johap92 

Wansung 

ko_KR-euc 

Packed 

ko_KR-johap 

Wansung 

ko_KR-euc 

N-Byte 

ko_KR-nbyte 

ILEG=KS X 1001 

ko_KR-euc 

ISO-2022-KR 

ko_KR-iso2022-7 

Johap 

ko_KR-johap92 

Wansung 

ko_KR-euc 

Packed 

ko_KR-johap 

Wansung 

ko_KR-euc 

N-Byte 

ko_KR-nbyte 

Wansung 

ko_KR-euc 

ISO-2022-KR 

ko_KR-iso2022-7 

Wansung 

ko_KR-euc 

The following modules perform character-based code conversion on the KS C 5700 character set. They convert KSC 5700 characters between Korean UTF-8, completion code (Wansung), and combination code (Johap).

Table 6–2 Common Korean iconv Code Conversion Modules (ko and ko.UTF-8 locales)

Easy Name from-code

Actual Name from-code

Easy Name to-code

Actual Name to-code

UTF-8 

ko_KR-UTF-8 

KS X 1001 

ko_KR-euc 

UTF-8 

ko_KR-UTF-8 

KS X 1001 

ko_KR-euc 

UTF-8 

UTF-8 

KS X 1001 

ko_KR-euc 

UTF-8 

UTF-8 

KS X 1001 

ko_KR.EUC 

UTF-8 

ko_KR-UTF-8 

Johap 

ko_KR-johap92 

UTF-8 

ko_KR-UTF-8 

Packed 

ko_KR-johap 

UTF-8 

ko_KR-UTF-8 

ISO-2022-KR 

ko_KR-iso2022-7 

Wansung 

ko_KR-euc 

UTF-8  

ko_KR-UTF-8 

Wansung 

ko_KR-euc 

UTF-8  

UTF-8 

Johap 

ko_KR-johap92 

UTF-8  

ko_KR-UTF-8 

Johap 

ko_KR-johap92 

UTF-8  

UTF-8 

Packed 

ko_KR-johap 

UTF-8  

ko_KR-UTF-8 

Packed 

ko_KR-johap 

UTF-8  

UTF-8 

ISO-2022-KR 

ko_KR-iso2022-7 

UTF-8  

ko_KR-UTF-8 

ISO-2022-KR 

ko_KR-iso2022-7 

UTF-8  

UTF-8 

UTF-8 

ko_KR.UTF-8 

Unified Hangul 

ko_KR-cp949 

UTF-8 

UTF-8 

Unified Hangul 

ko_KR-cp949 

Unified Hangul 

ko_KR-cp949 

UTF-8 

ko_KR-UTF-8 

Unified Hangul 

ko_KR-cp949 

UTF-8 

UTF-8 

In the following example, a KS C 5601 file (Korean EUC) is converted to KS C 5700 (ko.UTF-8).


system% iconv -f ko_KR-euc -t ko_KR-UTF-8ko_euc_file > ko_UTF-8_file

For further information, see the iconv(3C), iconv_ko.UTF-8(5), and iconv_utf(5) man pages. You can use these utilities to convert files for printing.