mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Restrict vertical tightness to parentheses in Perl code
The vertical tightness settings collapse vertical whitespace between opening and closing brackets (parentheses, square brakets and braces). This can make data structures in particular harder to read, and is not very consistent with our style in non-Perl code. This patch restricts that setting to parentheses only, and reformats all the perl code accordingly. Not applying this to parentheses has some unfortunate effects, so the consensus is to keep the setting for parentheses and not for the others. The diff for this patch does highlight some places where structures should have trailing commas. They can be added manually, as there is no automatic tool to do so. Discussion: https://postgr.es/m/a2f2b87c-56be-c070-bfc0-36288b4b41c1@2ndQuadrant.com
This commit is contained in:
@@ -48,12 +48,14 @@ foreach my $i (@$cp950txt)
|
||||
&& $code <= 0xf9dc)
|
||||
{
|
||||
push @$all,
|
||||
{ code => $code,
|
||||
{
|
||||
code => $code,
|
||||
ucs => $ucs,
|
||||
comment => $i->{comment},
|
||||
direction => BOTH,
|
||||
f => $i->{f},
|
||||
l => $i->{l} };
|
||||
l => $i->{l}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,13 @@ while (<$in>)
|
||||
}
|
||||
|
||||
push @mapping,
|
||||
{ ucs => $ucs,
|
||||
{
|
||||
ucs => $ucs,
|
||||
code => $code,
|
||||
direction => BOTH,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
close($in);
|
||||
|
||||
|
||||
@@ -33,13 +33,15 @@ while (my $line = <$in>)
|
||||
my $ucs2 = hex($u2);
|
||||
|
||||
push @all,
|
||||
{ direction => BOTH,
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => $ucs1,
|
||||
ucs_second => $ucs2,
|
||||
code => $code,
|
||||
comment => $rest,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
elsif ($line =~ /^0x(.*)[ \t]*U\+(.*)[ \t]*#(.*)$/)
|
||||
{
|
||||
@@ -52,12 +54,14 @@ while (my $line = <$in>)
|
||||
next if ($code < 0x80 && $ucs < 0x80);
|
||||
|
||||
push @all,
|
||||
{ direction => BOTH,
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => $ucs,
|
||||
code => $code,
|
||||
comment => $rest,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
}
|
||||
close($in);
|
||||
|
||||
@@ -115,352 +115,524 @@ foreach my $i (@mapping)
|
||||
}
|
||||
|
||||
push @mapping, (
|
||||
{ direction => BOTH,
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x4efc,
|
||||
code => 0x8ff4af,
|
||||
comment => '# CJK(4EFC)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(4EFC)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x50f4,
|
||||
code => 0x8ff4b0,
|
||||
comment => '# CJK(50F4)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(50F4)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x51EC,
|
||||
code => 0x8ff4b1,
|
||||
comment => '# CJK(51EC)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(51EC)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5307,
|
||||
code => 0x8ff4b2,
|
||||
comment => '# CJK(5307)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5307)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5324,
|
||||
code => 0x8ff4b3,
|
||||
comment => '# CJK(5324)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5324)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x548A,
|
||||
code => 0x8ff4b5,
|
||||
comment => '# CJK(548A)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(548A)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5759,
|
||||
code => 0x8ff4b6,
|
||||
comment => '# CJK(5759)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5759)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x589E,
|
||||
code => 0x8ff4b9,
|
||||
comment => '# CJK(589E)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(589E)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5BEC,
|
||||
code => 0x8ff4ba,
|
||||
comment => '# CJK(5BEC)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5BEC)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5CF5,
|
||||
code => 0x8ff4bb,
|
||||
comment => '# CJK(5CF5)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5CF5)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5D53,
|
||||
code => 0x8ff4bc,
|
||||
comment => '# CJK(5D53)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5D53)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x5FB7,
|
||||
code => 0x8ff4be,
|
||||
comment => '# CJK(5FB7)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(5FB7)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6085,
|
||||
code => 0x8ff4bf,
|
||||
comment => '# CJK(6085)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6085)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6120,
|
||||
code => 0x8ff4c0,
|
||||
comment => '# CJK(6120)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6120)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x654E,
|
||||
code => 0x8ff4c1,
|
||||
comment => '# CJK(654E)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(654E)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x663B,
|
||||
code => 0x8ff4c2,
|
||||
comment => '# CJK(663B)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(663B)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6665,
|
||||
code => 0x8ff4c3,
|
||||
comment => '# CJK(6665)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6665)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6801,
|
||||
code => 0x8ff4c6,
|
||||
comment => '# CJK(6801)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6801)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6A6B,
|
||||
code => 0x8ff4c9,
|
||||
comment => '# CJK(6A6B)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6A6B)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6AE2,
|
||||
code => 0x8ff4ca,
|
||||
comment => '# CJK(6AE2)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6AE2)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6DF2,
|
||||
code => 0x8ff4cc,
|
||||
comment => '# CJK(6DF2)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6DF2)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x6DF8,
|
||||
code => 0x8ff4cb,
|
||||
comment => '# CJK(6DF8)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(6DF8)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7028,
|
||||
code => 0x8ff4cd,
|
||||
comment => '# CJK(7028)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7028)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x70BB,
|
||||
code => 0x8ff4ae,
|
||||
comment => '# CJK(70BB)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(70BB)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7501,
|
||||
code => 0x8ff4d0,
|
||||
comment => '# CJK(7501)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7501)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7682,
|
||||
code => 0x8ff4d1,
|
||||
comment => '# CJK(7682)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7682)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x769E,
|
||||
code => 0x8ff4d2,
|
||||
comment => '# CJK(769E)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(769E)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7930,
|
||||
code => 0x8ff4d4,
|
||||
comment => '# CJK(7930)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7930)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7AE7,
|
||||
code => 0x8ff4d9,
|
||||
comment => '# CJK(7AE7)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7AE7)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7DA0,
|
||||
code => 0x8ff4dc,
|
||||
comment => '# CJK(7DA0)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7DA0)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x7DD6,
|
||||
code => 0x8ff4dd,
|
||||
comment => '# CJK(7DD6)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(7DD6)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x8362,
|
||||
code => 0x8ff4df,
|
||||
comment => '# CJK(8362)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(8362)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x85B0,
|
||||
code => 0x8ff4e1,
|
||||
comment => '# CJK(85B0)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(85B0)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x8807,
|
||||
code => 0x8ff4e4,
|
||||
comment => '# CJK(8807)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(8807)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x8B7F,
|
||||
code => 0x8ff4e6,
|
||||
comment => '# CJK(8B7F)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(8B7F)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x8CF4,
|
||||
code => 0x8ff4e7,
|
||||
comment => '# CJK(8CF4)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(8CF4)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x8D76,
|
||||
code => 0x8ff4e8,
|
||||
comment => '# CJK(8D76)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(8D76)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x90DE,
|
||||
code => 0x8ff4ec,
|
||||
comment => '# CJK(90DE)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(90DE)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x9115,
|
||||
code => 0x8ff4ee,
|
||||
comment => '# CJK(9115)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(9115)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x9592,
|
||||
code => 0x8ff4f1,
|
||||
comment => '# CJK(9592)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(9592)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x973B,
|
||||
code => 0x8ff4f4,
|
||||
comment => '# CJK(973B)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(973B)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x974D,
|
||||
code => 0x8ff4f5,
|
||||
comment => '# CJK(974D)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(974D)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x9751,
|
||||
code => 0x8ff4f6,
|
||||
comment => '# CJK(9751)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(9751)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x999E,
|
||||
code => 0x8ff4fa,
|
||||
comment => '# CJK(999E)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(999E)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x9AD9,
|
||||
code => 0x8ff4fb,
|
||||
comment => '# CJK(9AD9)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(9AD9)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x9B72,
|
||||
code => 0x8ff4fc,
|
||||
comment => '# CJK(9B72)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(9B72)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x9ED1,
|
||||
code => 0x8ff4fe,
|
||||
comment => '# CJK(9ED1)' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK(9ED1)'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xF929,
|
||||
code => 0x8ff4c5,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-F929' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-F929'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xF9DC,
|
||||
code => 0x8ff4f2,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-F9DC' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-F9DC'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA0E,
|
||||
code => 0x8ff4b4,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0E' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0E'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA0F,
|
||||
code => 0x8ff4b7,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0F' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0F'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA10,
|
||||
code => 0x8ff4b8,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA10' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA10'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA11,
|
||||
code => 0x8ff4bd,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA11' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA11'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA12,
|
||||
code => 0x8ff4c4,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA12' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA12'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA13,
|
||||
code => 0x8ff4c7,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA13' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA13'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA14,
|
||||
code => 0x8ff4c8,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA14' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA14'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA15,
|
||||
code => 0x8ff4ce,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA15' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA15'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA16,
|
||||
code => 0x8ff4cf,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA16' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA16'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA17,
|
||||
code => 0x8ff4d3,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA17' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA17'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA18,
|
||||
code => 0x8ff4d5,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA18' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA18'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA19,
|
||||
code => 0x8ff4d6,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA19' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA19'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA1A,
|
||||
code => 0x8ff4d7,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1A' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1A'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA1B,
|
||||
code => 0x8ff4d8,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1B' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1B'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA1C,
|
||||
code => 0x8ff4da,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1C' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1C'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA1D,
|
||||
code => 0x8ff4db,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1D' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1D'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA1E,
|
||||
code => 0x8ff4de,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1E' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1E'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA1F,
|
||||
code => 0x8ff4e0,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1F' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1F'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA20,
|
||||
code => 0x8ff4e2,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA20' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA20'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA21,
|
||||
code => 0x8ff4e3,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA21' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA21'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA22,
|
||||
code => 0x8ff4e5,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA22' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA22'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA23,
|
||||
code => 0x8ff4e9,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA23' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA23'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA24,
|
||||
code => 0x8ff4ea,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA24' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA24'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA25,
|
||||
code => 0x8ff4eb,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA25' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA25'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA26,
|
||||
code => 0x8ff4ed,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA26' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA26'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA27,
|
||||
code => 0x8ff4ef,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA27' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA27'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA28,
|
||||
code => 0x8ff4f0,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA28' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA28'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA29,
|
||||
code => 0x8ff4f3,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA29' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA29'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA2A,
|
||||
code => 0x8ff4f7,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2A' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2A'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA2B,
|
||||
code => 0x8ff4f8,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2B' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2B'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA2C,
|
||||
code => 0x8ff4f9,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2C' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2C'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFA2D,
|
||||
code => 0x8ff4fd,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2D' },
|
||||
{ direction => BOTH,
|
||||
comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2D'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFF07,
|
||||
code => 0x8ff4a9,
|
||||
comment => '# FULLWIDTH APOSTROPHE' },
|
||||
{ direction => BOTH,
|
||||
comment => '# FULLWIDTH APOSTROPHE'
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0xFFE4,
|
||||
code => 0x8fa2c3,
|
||||
comment => '# FULLWIDTH BROKEN BAR' },
|
||||
comment => '# FULLWIDTH BROKEN BAR'
|
||||
},
|
||||
|
||||
# additional conversions for EUC_JP -> UTF-8 conversion
|
||||
{ direction => TO_UNICODE,
|
||||
{
|
||||
direction => TO_UNICODE,
|
||||
ucs => 0x2116,
|
||||
code => 0x8ff4ac,
|
||||
comment => '# NUMERO SIGN' },
|
||||
{ direction => TO_UNICODE,
|
||||
comment => '# NUMERO SIGN'
|
||||
},
|
||||
{
|
||||
direction => TO_UNICODE,
|
||||
ucs => 0x2121,
|
||||
code => 0x8ff4ad,
|
||||
comment => '# TELEPHONE SIGN' },
|
||||
{ direction => TO_UNICODE,
|
||||
comment => '# TELEPHONE SIGN'
|
||||
},
|
||||
{
|
||||
direction => TO_UNICODE,
|
||||
ucs => 0x3231,
|
||||
code => 0x8ff4ab,
|
||||
comment => '# PARENTHESIZED IDEOGRAPH STOCK' });
|
||||
comment => '# PARENTHESIZED IDEOGRAPH STOCK'
|
||||
});
|
||||
|
||||
print_conversion_tables($this_script, "EUC_JP", \@mapping);
|
||||
|
||||
|
||||
@@ -32,23 +32,29 @@ foreach my $i (@$mapping)
|
||||
|
||||
# Some extra characters that are not in KSX1001.TXT
|
||||
push @$mapping,
|
||||
( { direction => BOTH,
|
||||
( {
|
||||
direction => BOTH,
|
||||
ucs => 0x20AC,
|
||||
code => 0xa2e6,
|
||||
comment => '# EURO SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => BOTH,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x00AE,
|
||||
code => 0xa2e7,
|
||||
comment => '# REGISTERED SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => BOTH,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x327E,
|
||||
code => 0xa2e8,
|
||||
comment => '# CIRCLED HANGUL IEUNG U',
|
||||
f => $this_script,
|
||||
l => __LINE__ });
|
||||
l => __LINE__
|
||||
});
|
||||
|
||||
print_conversion_tables($this_script, "EUC_KR", $mapping);
|
||||
|
||||
@@ -53,12 +53,14 @@ foreach my $i (@$mapping)
|
||||
if ($origcode >= 0x12121 && $origcode <= 0x20000)
|
||||
{
|
||||
push @extras,
|
||||
{ ucs => $i->{ucs},
|
||||
{
|
||||
ucs => $i->{ucs},
|
||||
code => ($i->{code} + 0x8ea10000),
|
||||
rest => $i->{rest},
|
||||
direction => TO_UNICODE,
|
||||
f => $i->{f},
|
||||
l => $i->{l} };
|
||||
l => $i->{l}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,11 +36,13 @@ while (<$in>)
|
||||
if ($code >= 0x80 && $ucs >= 0x0080)
|
||||
{
|
||||
push @mapping,
|
||||
{ ucs => $ucs,
|
||||
{
|
||||
ucs => $ucs,
|
||||
code => $code,
|
||||
direction => BOTH,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
}
|
||||
close($in);
|
||||
|
||||
@@ -26,23 +26,29 @@ my $mapping = &read_source("JOHAB.TXT");
|
||||
|
||||
# Some extra characters that are not in JOHAB.TXT
|
||||
push @$mapping,
|
||||
( { direction => BOTH,
|
||||
( {
|
||||
direction => BOTH,
|
||||
ucs => 0x20AC,
|
||||
code => 0xd9e6,
|
||||
comment => '# EURO SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => BOTH,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x00AE,
|
||||
code => 0xd9e7,
|
||||
comment => '# REGISTERED SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => BOTH,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => BOTH,
|
||||
ucs => 0x327E,
|
||||
code => 0xd9e8,
|
||||
comment => '# CIRCLED HANGUL IEUNG U',
|
||||
f => $this_script,
|
||||
l => __LINE__ });
|
||||
l => __LINE__
|
||||
});
|
||||
|
||||
print_conversion_tables($this_script, "JOHAB", $mapping);
|
||||
|
||||
@@ -33,13 +33,15 @@ while (my $line = <$in>)
|
||||
my $ucs2 = hex($u2);
|
||||
|
||||
push @mapping,
|
||||
{ code => $code,
|
||||
{
|
||||
code => $code,
|
||||
ucs => $ucs1,
|
||||
ucs_second => $ucs2,
|
||||
comment => $rest,
|
||||
direction => BOTH,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
elsif ($line =~ /^0x(.*)[ \t]*U\+(.*)[ \t]*#(.*)$/)
|
||||
{
|
||||
@@ -68,12 +70,14 @@ while (my $line = <$in>)
|
||||
}
|
||||
|
||||
push @mapping,
|
||||
{ code => $code,
|
||||
{
|
||||
code => $code,
|
||||
ucs => $ucs,
|
||||
comment => $rest,
|
||||
direction => $direction,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
}
|
||||
close($in);
|
||||
|
||||
@@ -36,53 +36,69 @@ foreach my $i (@$mapping)
|
||||
|
||||
# Add these UTF8->SJIS pairs to the table.
|
||||
push @$mapping,
|
||||
( { direction => FROM_UNICODE,
|
||||
( {
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x00a2,
|
||||
code => 0x8191,
|
||||
comment => '# CENT SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x00a3,
|
||||
code => 0x8192,
|
||||
comment => '# POUND SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x00a5,
|
||||
code => 0x5c,
|
||||
comment => '# YEN SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x00ac,
|
||||
code => 0x81ca,
|
||||
comment => '# NOT SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x2016,
|
||||
code => 0x8161,
|
||||
comment => '# DOUBLE VERTICAL LINE',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x203e,
|
||||
code => 0x7e,
|
||||
comment => '# OVERLINE',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x2212,
|
||||
code => 0x817c,
|
||||
comment => '# MINUS SIGN',
|
||||
f => $this_script,
|
||||
l => __LINE__ },
|
||||
{ direction => FROM_UNICODE,
|
||||
l => __LINE__
|
||||
},
|
||||
{
|
||||
direction => FROM_UNICODE,
|
||||
ucs => 0x301c,
|
||||
code => 0x8160,
|
||||
comment => '# WAVE DASH',
|
||||
f => $this_script,
|
||||
l => __LINE__ });
|
||||
l => __LINE__
|
||||
});
|
||||
|
||||
print_conversion_tables($this_script, "SJIS", $mapping);
|
||||
|
||||
@@ -39,22 +39,26 @@ while (<$in>)
|
||||
if ($code >= 0x80 && $ucs >= 0x0080)
|
||||
{
|
||||
push @mapping,
|
||||
{ ucs => $ucs,
|
||||
{
|
||||
ucs => $ucs,
|
||||
code => $code,
|
||||
direction => BOTH,
|
||||
f => $in_file,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
}
|
||||
}
|
||||
close($in);
|
||||
|
||||
# One extra character that's not in the source file.
|
||||
push @mapping,
|
||||
{ direction => BOTH,
|
||||
{
|
||||
direction => BOTH,
|
||||
code => 0xa2e8,
|
||||
ucs => 0x327e,
|
||||
comment => 'CIRCLED HANGUL IEUNG U',
|
||||
f => $this_script,
|
||||
l => __LINE__ };
|
||||
l => __LINE__
|
||||
};
|
||||
|
||||
print_conversion_tables($this_script, "UHC", \@mapping);
|
||||
|
||||
@@ -18,7 +18,8 @@ use constant {
|
||||
NONE => 0,
|
||||
TO_UNICODE => 1,
|
||||
FROM_UNICODE => 2,
|
||||
BOTH => 3 };
|
||||
BOTH => 3
|
||||
};
|
||||
|
||||
#######################################################################
|
||||
# read_source - common routine to read source file
|
||||
@@ -56,7 +57,8 @@ sub read_source
|
||||
comment => $4,
|
||||
direction => BOTH,
|
||||
f => $fname,
|
||||
l => $. };
|
||||
l => $.
|
||||
};
|
||||
|
||||
# Ignore pure ASCII mappings. PostgreSQL character conversion code
|
||||
# never even passes these to the conversion code.
|
||||
@@ -370,9 +372,11 @@ sub print_radix_table
|
||||
}
|
||||
|
||||
unshift @segments,
|
||||
{ header => "Dummy map, for invalid values",
|
||||
{
|
||||
header => "Dummy map, for invalid values",
|
||||
min_idx => 0,
|
||||
max_idx => $widest_range };
|
||||
max_idx => $widest_range
|
||||
};
|
||||
|
||||
###
|
||||
### Eliminate overlapping zeros
|
||||
@@ -655,12 +659,14 @@ sub build_segments_recurse
|
||||
if ($level == $depth)
|
||||
{
|
||||
push @segments,
|
||||
{ header => $header . ", leaf: ${path}xx",
|
||||
{
|
||||
header => $header . ", leaf: ${path}xx",
|
||||
label => $label,
|
||||
level => $level,
|
||||
depth => $depth,
|
||||
path => $path,
|
||||
values => $map };
|
||||
values => $map
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -678,12 +684,14 @@ sub build_segments_recurse
|
||||
}
|
||||
|
||||
push @segments,
|
||||
{ header => $header . ", byte #$level: ${path}xx",
|
||||
{
|
||||
header => $header . ", byte #$level: ${path}xx",
|
||||
label => $label,
|
||||
level => $level,
|
||||
depth => $depth,
|
||||
path => $path,
|
||||
values => \%children };
|
||||
values => \%children
|
||||
};
|
||||
}
|
||||
return @segments;
|
||||
}
|
||||
@@ -776,7 +784,8 @@ sub make_charmap_combined
|
||||
code => $c->{code},
|
||||
comment => $c->{comment},
|
||||
f => $c->{f},
|
||||
l => $c->{l} };
|
||||
l => $c->{l}
|
||||
};
|
||||
push @combined, $entry;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user