3
# All rights reserved. Copyright (C) 1999 by NARITA Tomio.
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# Unicode to KSC 5601-1987
12
$file = "zcat KSX1001.TXT.gz |";
14
for $i ( 0 .. $#ARGV ){
15
if( $ARGV[ $i ] eq "-i" ){
16
$file = $ARGV[ ++$i ];
20
open( FILE, $file ) || die( "cannot open $file" );
27
( $ksc, $uni, $rest ) = split;
29
$array{ $uni } = $ksc;
32
print "private codes_t mapKSC5601[ $count ] = {\n";
34
for $index ( sort keys( %array ) ){
35
$code = $array{ $index };
38
print " { $index, $code }\n";
40
print " { $index, $code },\n";