aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl')
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
index 092a5b44f55..6d1681a18a3 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
@@ -24,12 +24,13 @@ my @all;
while (my $line = <$in>)
{
- if ($line =~ /^0x(.*)[ \t]*U\+(.*)\+(.*)[ \t]*#(.*)$/)
+ if ($line =~ /^0x(\w+)\s*U\+(\w+)\+(\w+)\s*#\s*(\S.*)?\s*$/)
{
# combined characters
my ($c, $u1, $u2) = ($1, $2, $3);
- my $rest = "U+" . $u1 . "+" . $u2 . $4;
+ # The "\t \t" below is just to avoid insubstantial diffs.
+ my $rest = "U+" . $u1 . "+" . $u2 . "\t \t" . $4;
my $code = hex($c);
my $ucs1 = hex($u1);
my $ucs2 = hex($u2);
@@ -45,7 +46,7 @@ while (my $line = <$in>)
l => $.
};
}
- elsif ($line =~ /^0x(.*)[ \t]*U\+(.*)[ \t]*#(.*)$/)
+ elsif ($line =~ /^0x(\w+)\s*U\+(\w+)\s*#\s*(\S.*)?\s*$/)
{
# non-combined characters