diff options
author | John Naylor | 2021-08-26 13:58:28 +0000 |
---|---|---|
committer | John Naylor | 2021-08-26 13:58:28 +0000 |
commit | f8c8a8bccc23f6ca38f7a92c9a614e73fa1fcfb6 (patch) | |
tree | a04dae626dd5a0aea99142bc63cb86e66130521a /src/common/unicode | |
parent | 0d906b2c0b1f0d625ff63d9ace906556b1c66a68 (diff) |
Revert "Change mbbisearch to return the character range"
This reverts commit 78ab944cd4b9977732becd9d0bc83223b88af9a2.
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
Diffstat (limited to 'src/common/unicode')
-rw-r--r-- | src/common/unicode/generate-unicode_width_table.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/unicode/generate-unicode_width_table.pl b/src/common/unicode/generate-unicode_width_table.pl index 0cf44b029c7..90b57af075e 100644 --- a/src/common/unicode/generate-unicode_width_table.pl +++ b/src/common/unicode/generate-unicode_width_table.pl @@ -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; } } |