mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Revert "Change mbbisearch to return the character range"
This reverts commit78ab944cd4. After I had committedeb0d0d2c7and78ab944cd, I decided to add a sanity check for a "can't happen" scenario just to be cautious. It turned out that it already happened in the official Unicode source data, namely that a character can be both wide and a combining character. This fact renders the aforementioned commits unnecessary, so revert both of them. Discussion: https://www.postgresql.org/message-id/CAFBsxsH5ejH4-1xaTLpSK8vWoK1m6fA1JBtTM6jmBsLfmDki1g%40mail.gmail.com
This commit is contained in:
@@ -17,7 +17,7 @@ my $count = 0;
|
||||
print
|
||||
"/* generated by src/common/unicode/generate-unicode_width_table.pl, do not edit */\n\n";
|
||||
|
||||
print "static const struct mbinterval wcwidth[] = {\n";
|
||||
print "static const struct mbinterval combining[] = {\n";
|
||||
|
||||
foreach my $line (<ARGV>)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ foreach my $line (<ARGV>)
|
||||
# not a combining character, print out previous range if any
|
||||
if (defined($range_start))
|
||||
{
|
||||
printf "\t{0x%04X, 0x%04X, 0},\n", $range_start, $prev_codepoint;
|
||||
printf "\t{0x%04X, 0x%04X},\n", $range_start, $prev_codepoint;
|
||||
$range_start = undef;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user