diff options
author | Karl Berry <karl@freefriends.org> | 2015-02-04 22:13:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-02-04 22:13:20 +0000 |
commit | 3b79a7edb270159eeb2aa2dd72f9cdcff1289fed (patch) | |
tree | 6185c98ec795bfe3b52bc4e5c631b9768b870c99 /Master/texmf-dist/scripts/kotex-utils | |
parent | 93c850c63d0ceadb34e2e7ff703676f122ebb581 (diff) |
kotex-utils (4feb15)
git-svn-id: svn://tug.org/texlive/trunk@36210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/kotex-utils')
-rwxr-xr-x | Master/texmf-dist/scripts/kotex-utils/jamo-normalize.pl | 18 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/kotex-utils/komkindex.pl | 10 |
2 files changed, 15 insertions, 13 deletions
diff --git a/Master/texmf-dist/scripts/kotex-utils/jamo-normalize.pl b/Master/texmf-dist/scripts/kotex-utils/jamo-normalize.pl index f6ed6e70496..a22c5c01401 100755 --- a/Master/texmf-dist/scripts/kotex-utils/jamo-normalize.pl +++ b/Master/texmf-dist/scripts/kotex-utils/jamo-normalize.pl @@ -50,15 +50,15 @@ while (@ARGV) { ##### variables ##### -my $cho = "\x{1100}-\x{115F}\x{A960}-\x{A97C}"; -my $jung = "\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}"; -my $jong = "\x{11A8}-\x{11FF}\x{D7CB}-\x{D7FB}"; -my $tmrk = "\x{302E}\x{302F}"; -my $boundary = "\x{200B}"; -my $syllblock = "[$cho][$jung][$jong]?[$tmrk]?"; -my $jamos = "[$cho$jung$jong$tmrk]"; +my $cho = "\x{1100}-\x{115F}\x{A960}-\x{A97C}"; +my $jung = "\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}"; +my $jong = "\x{11A8}-\x{11FF}\x{D7CB}-\x{D7FB}"; +my $tmrk = "\x{302E}\x{302F}"; +my $boundary = "\x{200B}"; +my $syllblock = "[$cho][$jung][$jong]?[$tmrk]?"; +my $jamos = "[$cho$jung$jong$tmrk]"; -my %jamo2cjamo = ( +my %jamo2cjamo = ( 0x1100 => 0x3131, 0x1101 => 0x3132, 0x1102 => 0x3134, 0x1103 => 0x3137, 0x1104 => 0x3138, 0x1105 => 0x3139, 0x1106 => 0x3141, 0x1107 => 0x3142, 0x1108 => 0x3143, 0x1109 => 0x3145, 0x110A => 0x3146, 0x110B => 0x3147, @@ -182,7 +182,7 @@ sub insert_boundary { my @subparts = split /($jamos)/, $parts[$i]; my @newsubparts; for my $i (0 .. $#subparts) { - push @newsubparts, $subparts[$i] if $subparts[$i]; + push @newsubparts, $subparts[$i] if $subparts[$i]; } push @newparts, join ($boundary, @newsubparts); } diff --git a/Master/texmf-dist/scripts/kotex-utils/komkindex.pl b/Master/texmf-dist/scripts/kotex-utils/komkindex.pl index 4efc054fefd..93d7ac4893d 100755 --- a/Master/texmf-dist/scripts/kotex-utils/komkindex.pl +++ b/Master/texmf-dist/scripts/kotex-utils/komkindex.pl @@ -275,7 +275,7 @@ foreach my $file (@IDXfiles) { } # @을 경계로 가름. - my @ybody = split /(?<!\Q$ist_quote\E])\Q$ist_actual\E/, $_; + my @ybody = split /(?<!\Q$ist_quote\E)\Q$ist_actual\E/, $_; $_ = $ybody[0]; s/[{}]//g; @@ -293,13 +293,15 @@ foreach my $file (@IDXfiles) { $ybody[0] = $_; + my $tmpkey = $ybody[1]; + $tmpkey =~ s/(?<!\\)\Q$ist_quote\E(.)/$1/g; my @tmp = split "",$ybody[0]; - $idxhash{ $ybody[1] } = $tmp[0]; # for grouping routine + $idxhash{ $tmpkey } = $tmp[0]; # for grouping routine if ( $tmp[0] =~ /^\x{F801}/ ) { # 초성채움. - $idxhash{ $ybody[1] } = $tmp[1]; + $idxhash{ $tmpkey } = $tmp[1]; } if ( $tmp[0] =~ /^\x{F806}/ ) { # 중성채움. - $idxhash{ $ybody[1] } = $tmp[2]; + $idxhash{ $tmpkey } = $tmp[2]; } $_ = join $ist_actual,@ybody; |