Skip to content

Commit 1563ecb

Browse files
committed
Revert "Rename unicode_combining_table to unicode_width_table"
This reverts commit eb0d0d2. After I had committed eb0d0d2 and 78ab944, 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
1 parent f8c8a8b commit 1563ecb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/common/unicode/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LIBS += $(PTHREAD_LIBS)
1818
# By default, do nothing.
1919
all:
2020

21-
update-unicode: unicode_norm_table.h unicode_width_table.h unicode_normprops_table.h unicode_norm_hashfunc.h
21+
update-unicode: unicode_norm_table.h unicode_combining_table.h unicode_normprops_table.h unicode_norm_hashfunc.h
2222
mv $^ ../../../src/include/common/
2323
$(MAKE) normalization-check
2424

@@ -35,7 +35,7 @@ unicode_norm_hashfunc.h: unicode_norm_table.h
3535
unicode_norm_table.h: generate-unicode_norm_table.pl UnicodeData.txt CompositionExclusions.txt
3636
$(PERL) generate-unicode_norm_table.pl
3737

38-
unicode_width_table.h: generate-unicode_width_table.pl UnicodeData.txt
38+
unicode_combining_table.h: generate-unicode_combining_table.pl UnicodeData.txt
3939
$(PERL) $^ >$@
4040

4141
unicode_normprops_table.h: generate-unicode_normprops_table.pl DerivedNormalizationProps.txt

src/common/unicode/generate-unicode_width_table.pl renamed to src/common/unicode/generate-unicode_combining_table.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
my $count = 0;
1616

1717
print
18-
"/* generated by src/common/unicode/generate-unicode_width_table.pl, do not edit */\n\n";
18+
"/* generated by src/common/unicode/generate-unicode_combining_table.pl, do not edit */\n\n";
1919

2020
print "static const struct mbinterval combining[] = {\n";
2121

src/common/wchar.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ mbbisearch(pg_wchar ucs, const struct mbinterval *table, int max)
644644
static int
645645
ucs_wcwidth(pg_wchar ucs)
646646
{
647-
#include "common/unicode_width_table.h"
647+
#include "common/unicode_combining_table.h"
648648

649649
/* test for 8-bit control characters */
650650
if (ucs == 0)

src/include/common/unicode_width_table.h renamed to src/include/common/unicode_combining_table.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* generated by src/common/unicode/generate-unicode_width_table.pl, do not edit */
1+
/* generated by src/common/unicode/generate-unicode_combining_table.pl, do not edit */
22

33
static const struct mbinterval combining[] = {
44
{0x0300, 0x036F},

0 commit comments

Comments
 (0)