1
0
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 commit 78ab944cd4.

After I had committed eb0d0d2c7 and 78ab944cd, 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:
John Naylor
2021-08-26 09:58:28 -04:00
parent 0d906b2c0b
commit f8c8a8bccc
3 changed files with 203 additions and 208 deletions

View File

@@ -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;
}
}